Tag Archives: url

How to make an URL Shortener (with code in PHP and MySQL database)

Considering the number of URL Shortening services, I decided to make a short review of the subject. URL Shorteners were made popular by micro-blog services which used limited number of characters for a message e.g. Twitter.

So, here’s what’s covered:

Update (2011-07-29):
Reorganized code. It’s now divided into classes, easier for understanding and reuse. Using PDO for database connection instead of mysql methods. Added QR Code for generated shortlinks. This tutorial won’t change anymore, since it’s on the basic level it needs to be. For more information, you can follow the URL Shortening project I started, named BooRL.

Continue reading

Tagged , , ,

URL Encode/Decode

The first real use of Exec-PHP.. Yesterday I was looking for an online URL Encoder/Decoder, and all I found were encoders and a decoder on some prehistoric website. So, here’s a encoder/decoder written in PHP (it’s not really written, it’s just using urlencode() and urldecode() functions..). More info about Percent-encoding.

Encode Decode

Tagged , , , ,