Shrink your url with tiny url api
Url shortening procedure could be much simple if you use url shortening api. Tiny Url api makes it possible to shorten urls with file_get_contents php function. the $u variable is a long variable inserted into the function . Function returns shortened url.
function TinyURL($u){
return file_get_contents(’http://tinyurl.com/api-create.php?url=’.$u);
}
