this example shows how to get a short url using the service from is.gd
<?php /* Get a is.gd short url using PHP */ function isgd($url) { $ch = curl_init(); $timeout = 5; curl_setopt($ch,CURLOPT_URL,’http://is.gd/api.php?longurl=’.$url); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout); [...]
