PHP tinyurl

30.Jun.2010

Use PHP tinyurl to get shorten URL by tinyurl service. This short snippet will show you how to make function to get PHP tinyurl:

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