API

Quick short URL PHP function

August 27, 2010 · 1

function shortURL($long) { $short=file_get_contents(“http://is.gd/api.php?longurl=”.$long); return $short; } Usage: $short = shortURL(“http://veryveryveryverylongurl.tld/something/verylong.php”); echo $short;