how to generate short urls without api key in php.
<?php
$maketiny = 'http://phponlinetutorial.blogspot.in';//
function make_tiny($url)
{
$ch = curl_init();
$timeout = 5;
curl_setopt($ch, CURLOPT_URL,'http://tinyurl.com/api-create.php?url='.$url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
$tinyurl = make_tiny(''.$maketiny.'');
echo $tinyurl; ?>