Our friends from learn-drupal.in had this interesting piece of information, which is perhaps useful for others as well.
view the original page at: http://www.learn-drupal.in/api/goo-gl-api-php.html
$longUrl = 'http://www.your-log-url-here.......';
$apiKey = 'Your Google Api Key here';
//You can get API key here : http://code.google.com/apis/console/
$postData = array('longUrl' => $longUrl, 'key' => $apiKey);
curl_setopt($curlObj, CURLOPT_URL
, 'https://www.googleapis.com/urlshortener/v1/url');
curl_setopt($curlObj, CURLOPT_HTTPHEADER
, array('Content-type:application/json'));
echo 'Shortened URL ->'.$json->id;