This is the culmination of a couple hours of work on Friday (the 22nd of January) night. It’s near feature complete, and fully functional. Take a look!

Files: (save as .pl file to run it.) **This code was last tested/updated on March 7, 2010, updated from original code posted here**

So far there have been a lot of changes as follows:

  1. Shorten.pl now corrects for forgotten http:// prefixes to URLs, detects for invalid URLs (check code to see what it does)
  2. Index.pl now has jQuery powered Ajax “Quick” functions for shortening and expanding URLs
  3. Index.pl has a new API=3 webpage output which reveals all of the information that the JSON (API=4) reveals; total views, unique views (by IP), date created, date last used, and how many other short codes exist pointing to the same URL
  4. Shorten.pl API=4 now displays how many other shortcodes point to that same URL
  5. I’ve reverted list.pl back to not using threads
  6. Perl.css now has a span tag for use with the Ajax on index.pl
  7. I’ve cleaned up the unused features in the code in general.
  8. I’ve added new messages to subs.pl in the &setMessage() sub routine.
    • User-based authentication or user-specific click tracking
    • A better stats.pl
    • On index.pl, use a button in place of the “Quick” links, and have the enter key automatically do the Ajax
    • Clean up API in shorten.pl for Ajax support
    • New CSS
    • XML output
    • Better URL parsing
    • A generic logo
    • Clean up index.pl to make it more portable
    • Track visits to home page OR make home page a static HTML page (no Perl)
  9. Future features include:

    What do you think?

    FWIW this code is free for you to use, however if you use or modify this code please do it with attribution and submit changes to be shared among anyone interested.

    This code is available without warranty or guarantee.

Google Buzz

Post to Twitter Post to Delicious Post to Digg Post to Ping.fm Post to Reddit Post to StumbleUpon