I neeeded a simple URL shortener for a framed image site (the framing wasn’t my idea). It had to work on non-php pages, so I came up with an iframe solution.
url/index.php (this file looks up the shortened URL and redirects)
<?php $link = mysql_connect('localhost', 'user', 'password') or die('Could not connect: ' . mysql_error()); mysql_select_db('url') or die('Could not select database'); // Performing SQL query $query = "SELECT * FROM links WHERE linkin = '".