Tiny URL API
About the Author
Mike Rogers is a Web Developer who is currently at University studying Web Technologies. He also is the founder of Full On Design. He has several years experience freelancing and you can follow him on Twitter (Rogem002).
Believe it or not, TinyURL has an API which allows you to instantly create TinyURL’s of links. Luckily it’s also free to use and currently does not require resistration.
All you need to do is send a request to:
http://tinyurl.com/api-create.php?url=URL_HERE
The code
<?php
echo file_get_contents('http://tinyurl.com/api-create.php?url='.'http://www.example.com/');
/* For example
http://tinyurl.com/api-create.php?url=http://www.fullondesign.co.uk/
Would return:
http://tinyurl.com/d4px9f
*/
?>