All Projects → mikecao → Shorty

mikecao / Shorty

Licence: mit
A simple URL shortener for PHP

Projects that are alternatives of or similar to Shorty

Gh Pages Url Shortener
Minimal URL shortener that can be entirely hosted on GitHub pages.
Stars: ✭ 924 (+492.31%)
Mutual labels:  url-shortener
Url Shortener
Web application that will help you in shortening your url
Stars: ✭ 65 (-58.33%)
Mutual labels:  url-shortener
Laravel Short Url
A Laravel package to shorten urls
Stars: ✭ 127 (-18.59%)
Mutual labels:  url-shortener
Koochooloo
Make your URLs shorter (smaller) and more memorable in Go
Stars: ✭ 29 (-81.41%)
Mutual labels:  url-shortener
Jsoncrush
Compress JSON into URL friendly strings
Stars: ✭ 1,071 (+586.54%)
Mutual labels:  url-shortener
Shlink Web Client
A React-based client application for Shlink
Stars: ✭ 81 (-48.08%)
Mutual labels:  url-shortener
Shlink
The definitive self-hosted URL shortener
Stars: ✭ 727 (+366.03%)
Mutual labels:  url-shortener
Point
Create and manage shortened URLs with GitHub pages.
Stars: ✭ 146 (-6.41%)
Mutual labels:  url-shortener
Donotlink
An anonymous URL-shortener that blocks bots and removes referers
Stars: ✭ 56 (-64.1%)
Mutual labels:  url-shortener
Filite
A simple, light and standalone pastebin, URL shortener and file-sharing service
Stars: ✭ 125 (-19.87%)
Mutual labels:  url-shortener
Longurl
ℹ️ Small R package for no-API-required URL expansion
Stars: ✭ 30 (-80.77%)
Mutual labels:  url-shortener
Getlink Next
Get Link!
Stars: ✭ 48 (-69.23%)
Mutual labels:  url-shortener
Prestashop Clean Urls
Prestashop module. This override module allows to remove IDs from URLs
Stars: ✭ 87 (-44.23%)
Mutual labels:  url-shortener
Bloggerjs
Script para modificar el formato de las URL en un blog de Blogger.
Stars: ✭ 28 (-82.05%)
Mutual labels:  url-shortener
Fossurl
Your Own Url Shortner Without any fancy server side processing and support for custom url , which can even be hosted on GitHub Pages
Stars: ✭ 131 (-16.03%)
Mutual labels:  url-shortener
Zws
Shorten URLs using invisible spaces.
Stars: ✭ 780 (+400%)
Mutual labels:  url-shortener
Shorty
🔗 A URL shortening service built using Flask and MySQL
Stars: ✭ 78 (-50%)
Mutual labels:  url-shortener
Urlshorting
A simple but powerful URL shortener
Stars: ✭ 150 (-3.85%)
Mutual labels:  url-shortener
Serverless Url Shortener
URL shortener for AWS Lambda and S3
Stars: ✭ 146 (-6.41%)
Mutual labels:  url-shortener
Sheets Url Shortener
A simple short URL redirect service built on top of Google Sheets, and runs for cheap on Google Cloud Run serverless.
Stars: ✭ 89 (-42.95%)
Mutual labels:  url-shortener

Shorty

Shorty is a simple URL shortener for PHP.

Installation

1. Download and extract the files to your web directory.

2. Use the included database.sql file to create a table to hold your URLs.

3. Configure your webserver.

For Apache, edit your .htaccess file with the following:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [QSA,L]

For Nginx, add the following to your server declaration:

server {
    location / {
        rewrite ^/(.*)$ /index.php?q=$1;
    }
}

4. Edit the config.php file.

Generating short URLs

To generate a short URL, simply pass in a url query parameter to your Shorty installation:

http://example.com/?url=http://www.google.com

This will return a shortened URL such as:

http://example.com/9xq

When a user opens the short URL they will be redirected to the long URL location.

By default, Shorty will generate an HTML response for all saved URLs. You can alter the response format by passing in a format query parameter.

http://example.com/?url=http://www.google.com&format=text

The possible formats are html, xml, text, and json.

Whitelist

By default anyone is allowed to enter a new URL for shortening. To restrict the saving of URLs to certain IP addresses, use the allow function:

$shorty->allow('192.168.0.10');

Requirements

  • PHP 5.1+
  • PDO extension

License

Shorty is licensed under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].