getshlogo.png
Home | Api | Terms of Use | Contact

request example:

http://get.sh/api/?url=http://en.wikipedia.org/wiki/URL_shortening


response example:

http://get.sh/nTm


php-source example:

<?php
 
/* your code */
 
$request = 'http://get.sh/api/?url='.urlencode($longurl);
$shorturl = file_get_contents($request);
if (substr($shorturl, 0, 4) == 'http') {
	echo 'short-url:'.$shorturl:
} else {
	echo 'error:'.$shorturl:
} 
 
/* your code */
 
?>