Entries tagged ‘function’
May 18th 2010
Expanding Short URLs with PHP: expand_url PHP function
URL shortening services work by redirecting a users browser from the shortened URL to the actual target URL. Some of these services provide means of reversing the shortening process. Some provide API methods for this.
The following function will take a shortened URL, from any service, and return the original URL. As it works by inspecting [...]
May 18th 2010
Create Short URLs with PHP: shorten_url PHP Function
Do you want to create short urls from within your own PHP application? Most url shortening services provide an API, it’s how apps like twitter clients provide built-in url shortening. I wrote a small PHP function to provide url shortening from two of the most popular services, is.gd and tinyurl.com. Where’s bit.ly I hear you [...]

