PHP tiny url encode and decode functions


/ Published in: PHP
Save to your folder(s)

The first function make short urls.
The second function decode a short url with CURL. It gets the http header of the short url page. If the header contains a "Location:" header, then it's a redirect, and the decoded url is the url in the "Location" header string, here is the code:

URL: http://www.barattalo.it/2009/12/29/tiny-url-encode-and-decode-with-php/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.