Skip to content

LURL

LURL - Little URL - A program to create shortened urls.

Download:
LURL version 2 to PHP4
LURL version 2 to PHP5

Changelog version 0.2:
- Changes in method to generate the key.
- Minor bugs from PHP4 version.
- Change all the classes of version to PHP5

Dependencies:
- PHP4 or PHP5
- mod_rewrite

Next functionalities (probably):
- Page with list of links letting user to see stats of each link

How to use:
- Create the database with the tables
- Setup Config.php. Example:

$config["hostname"] = "localhost";
$config["username"] = "matheus";
$config["password"] = "yourpassord";
$config["dbname"] = "lurl_db";
$config["domain"] = "http://wordpress.matbra.com"; // Define a configuração da URL inicial (http://wordpress.matbra.com)
$config["path"] = "lurl"; // caminho/caminho2 (onde está os scripts do LURL)
$config["my_keys"] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
$config["num_chars"] = 6;

- Create MOD_REWRITE. Exemple:

<IfModule mod_rewrite.c>

RewriteEngine On
RewriteBase /

# REDIRECT ACCESS FROM /XXXXXX
# TO /lurl/index.php?u=XXXXXX it is possible to have more chars. (use {7} {8} for it...)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([A-Za-z0-9]{6})$ /lurl/index.php?u=$1 [L]

# IT WAS IN MY MOD REWRITE
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

</IfModule>

2 Comments

  1. Steven Steven

    Is it for private use? Can people create their account and use it?

  2. If you want a more solid stuff, I think you should go with YOURLS. Maybe LURL is out of date.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.