you are here: codestackercodes [RSS] → tag tinyurl [RSS]

short url in wordpress with tinyurl

paste the function in function.php file and call in you template with:

<?php echo 'ID)).'">short url'; ?>

<?php

function getShortUrl($url) {
  $tinyurl = file_get_contents("http://tinyurl.com/api-create.php?url=".$url);
  return $tinyurl;
}

?>
Displaying 1 Code