I've spent an hour or two building a MySQL based Short URL service. When I was new to PHP, I made a really bad one, that made a directory with an index.php file in it. The problem with this was that it made bad permissions so I couldn't delete what I'd done
So, this morning I decided I'd made a quick version. It's easy to use, and requires four file edits to customise it to any server. Firstly, you need to edit the config.inc.php file, adding your MySQL details (it makes the table itself when you run install.php). Then you need to replace the HTML and links in add.php and go.php with your own HTML and links, and then finally you need to edit the .htaccess file so that it will go to the right place. Then to make it work, you just make an index file with a form. Make a text field called "url" and set the form action to add.php! That's it! It creates nice URLs, such as http://url.lolz.co.uk/1234
Demo: http://url.lolz.co.uk/
Download: http://url.lolz.co.uk/89743







Reply With Quote









