Recently for a project which I was working on, I wanted a way to expand urls shorted by url shorteners.
After a couple of web searches I found an API site called LongURL. This service was really slow and I had to look for alternatives.
I thought of writing my own using curl and then parse the headers. I was searching for the curl functions in PHP Manual and I found a simple but not so famous function called get_headers().
This function is all we need to expand the urls. The following function
expand_url() takes a short url and will return the longer version of the url.
- Generating dynamic files for download from PHP
- Installing PHP 5.3.x in Ubuntu through apt-get or aptitude
- Code sample to access YQL from PHP
- Interacting with XMPP using PHP
- Using Memcache to improve PHP performance
- Consolidated all my code in github
- Using WordPress as a platform
- Associating urls created with bit.ly API to your account
- Adding retweet buttons for WordPress posts