Your Ad Here

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.


You may like these posts

    How to Build PHP application in Google App EngineHow to send external html content mail using php?How to get list of table names from database in mysql?Inactive in site then auto logout using php

 

Leave a Reply