Overview
Short URLs like the ones generated by URL shortening services like tinyurl.com drive me crazy! I can never see where I'm going. That's why I created this fancy-pantsy PHP class to decode all shortened URLs, no matter what URL shortening service created it.
Usage
To use simply include longurl.php and use the longurl::get() function.
include('longurl.php');
$longurl = longurl::get('http://tinyurl.com/past9o');
The above would display the URL to this page. Wanna use it? Then download it.
Extra!
Additionally, the class also includes the longurl::headers() function that simply returns an array containing the headers returned by the given URL.
print_r(longurl::headers('http://tinyurl.com/past9o'));
Don't forget it uses cURL so you are gonna need that installed if you are using this!
Comment
See what others have to say on this topic, or add your own two cents.