Calendar

<<February>>
MoTuWeThFrSaSu
1234567
891011121314
15161718192021
22232425262728

(Yet another) short URL service

Tue, 13 Oct 2009 20:30 - Daniel - Other - Comments (0)


I've set up a short URL service at url.pew.cc. It's basically the same as tinyurl.com, but with a cool ajax UI. Yay ;). And the best? url.pew.cc is one character shorter then tinyurl.com. Now if that ain't a perfect reason to use it.

Anyway, I just wanted to do my own url shortening and don't rely on a third party service for it. url.pew.cc is powered by php and sqlite. It has the same API as tinyurl.com. http://url.pew.cc/files/api-create.php?url=URL will respond with the short url. Adding format xml will respond with an xml file and a bit more verbose error messages, e.g. http://url.pew.cc/files/api-create.php?format=xml&url=URL.

The xml format used is:

<shorturl>
<status>0</status>
<url>ORIGINAL URL</url>
<short>SHORT VERSION</short>
</shorturl>


And for errors:

<shorturl>
<status>1</status>
<error>ERROR MESSAGE</error>
</shorturl>


Sorry, there is no create.php for a fancy html output. If you want to use it as a bookmarklet, this will have to do. Bookmark this link: url.pew.cc

If it works alright I might share the code at some point.



Tags: php jquery javascript pew.cc sqlite tinyurl



1