Archive

Posts Tagged ‘Phurl’

Patch to Phurl 1.5, the PHP URL Shortening Script

April 12th, 2009 1 comment

Recently I saw some posts on twitter from @mled that contained short URLs linked to his own domain mled.me. After a few tweets I was introduced to the Phurl, the PHP URL Shortening Script which is the result of the hard work of Hidayet Dogan.

This script is very easy to get installed and running on a Linux box with a LAMP setup. I then started to use it. However when posting some Launchpad URLs that contained ‘+’ characters, I discovered that Phurl did not store the URL correctly therefore causing the shortened URL not to wok.

I emailed Hidayet with this question, and overnight I got a response that included the fix:-

in create.php

change:

$url = trim(urldecode(@$_REQUEST['url']));

to:

$url = trim(@$_REQUEST['url']);

This will ensure that URLs are correctly stored in the database, including those containing the ‘+’ character.

I am sure this fix will be included in the next release of Phurl, but to make sure your installation is free from this issue then make the changes above.

Categories: Software Tags: , , , , ,