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
*/
?>








Hi Mike,
Have you tried the API for short urls at http://101.gs? They have a web service version but I am not sure which is best to use – Web services or Remote call.
NB
Thanks for the comment
I haven’t used their API yet, but I’ll give it a go and write a post on which is best.
Thank you for the example.
What if:
I need to make shorter multiple links. All that i need is a shorter url for each.
Do you have any clue ?
thank you.
You can just reuse the function for each link.