Do you have a php script that use the API from bit.ly ?
I just googled your question : Example code
/* Example code */
$link = "http://www.stackoverflow.com";
print getSmallLink($link);
function getSmallLink($longurl){
// Bit.ly
$url = "http://api.bit.ly/shorten?version=2.0.1&longUrl=$longurl&login=YOURLOGIN&apiKey=YOURAPIKEY&format=json&history=1";
$s = curl_init();
curl_setopt($s,CURLOPT_URL, $url);
curl_setopt($s,CURLOPT_HEADER,false);
curl_setopt($s,CURLOPT_RETURNTRANSFER,1);
$result = curl_exec($s);
curl_close( $s );
$obj = json_decode($result, true);
return $obj["results"]["$longurl"]["shortUrl"];
}