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>

54 Comments

  1. Thanks for your article. It’s very unfortunate that over the last years, the travel industry has had to deal with terrorism, SARS, tsunamis, bird flu, swine flu, as well as first ever real global economic collapse. Through everything the industry has proven to be sturdy, resilient as well as dynamic, finding new strategies to deal with adversity. There are continually fresh challenges and chance to which the business must yet again adapt and reply.

  2. Thanks , I have recently been looking for information about this topic for a long time and yours is the greatest I have came upon so far. However, what concerning the conclusion? Are you sure about the supply?

  3. Thank you for another informative web site. The place else could I get that kind of information written in such an ideal method? I have a project that I am just now operating on, and I’ve been at the look out for such information.

Leave a Reply

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