Get short urls for Twitter with PHP

Submitted by:Jhon Smith

Date added:04 June, 2012

Category:PHP

You can use a url shortener with Twitter such as tinyurl.com

Tags: short urls

Code Snippet:

    <?php
function getShortUrl($url){
return file_get_contents('http://tinyurl.com/api-create.php?url='.$url);
}
?>
 
 

Comments