= 13 ){ return $myshorturl; }; */ $bitlyurl = "http://api.bit.ly/shorten?version=2.0.1&longUrl=$longurl&login=$username&apiKey=$bitly_api"; $returnContent = file_get_contents($bitlyurl); $Array = explode('"', $returnContent); $ShortUrl = $Array[25]; return $ShortUrl; }; #function makeShortUrl(){ function postTwitter($url,$search){ $titter_user = "torrentrage"; $titter_pass = "torrentrage23"; $tweet = new Twitter($titter_user, $titter_pass); //if ( strlen($url) < 7 ){ // http://www.torrentrage.com/torrent/annett.html $url = "http://www.torrentrage.com/torrent/" .strtolower(title_plus($search)) . ".html"; //}; $text = "$url - #torrent for $search"; if ( strlen($text) > 140 ) { $text = substr($text, 0, 139); }; $success = $tweet->update($text); return 1; }; # function postTwitter($url,$search){ function tinyUrl($url) { $returnContent = file_get_contents('http://tinyurl.com/api-create.php?url='.urlencode($url)); //echo 'http://tinyurl.com/api-create.php?url='.urlencode($url); return $returnContent; } function isgd($url) { $returnContent = file_get_contents('http://is.gd/api.php?longurl='.urlencode($url)); return $returnContent; } ?>