Create TinyURL with PHP
function getTinyUrl($url) { return file_get_contents('http://tinyurl.com/api-create.php?url='.urlencode($url)); } // Example Use: $url = 'http://google.com'; echo getTinyUrl($url);
This PHP function uses the TinyURL API to create a shorter URL.
Most popular snippets