Home » PHP Code, SEO »

0

The following php code will generate the tiny urls

<?php
 
function getTinyUrl($url)
{
$tinyurl = file_get_contents("http://tinyurl.com/api-create.php?url={$url}");
return $tinyurl;
}
 
$url="http://www.anil2u.info";
echo getTinyUrl($url);
 
// gives the output is  http://tinyurl.com/lj4noe
?>

This will be useful when we are trying to post our url in different blog.
If we want more impressions without knowing the url name then we can use this function.


Related Posts

    Simple Steps to Build a Custom CMS application Using PHPHow to convert feeds to html using javascript and phpPHP Charts with using Google APIHow to remove consecutive whitespaces using php?

 

Leave a Reply