code.gushue.net ~ tinyurl.com catcher
tinyurl.com catcher v0.1
Intercepts tinyurl.com URLs and figures out what they are
Copyright (C) 2004 Chris Gushue <chris@blackplasma.net>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Don't like the GPL? Too bad, I wrote this, not you :P
This uses http://sourceforge.net/projects/snoopy/
The way I use it:
- Add a tinyurl.com VirtualHost directive to your Apache web server
- Save this file as index.php in that directory
- Place Snoopy.class.php in there as well
- Put the following in the .htaccess file for it:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /index.php?url=$1 [L] - Add the IP of your server to your hosts file (how that's done depends on which OS you use, Google for info if needed)
- Possibly restart your browser and flush DNS caches
Now you don't have to blindly click on tinyurl.com addresses, or have to worry about possible offensive content.
It's a great service for making long URLs short, but is naturally very prone to abuse.
Enjoy.
Version history
0.1 (Sep 05 2004) - Initial and hopefully final release