retrieve latitude and longitude from google latitude
<p>I am working on a project and i want to retrieve latitude and longitude using this code but it is not 
returning me...please check this code</p>

<pre><code>&lt;?PHP
header('Content-Type: text/plain');
//$userkey='AIzaSyB2hw658V7RSzEYgwSHwYkaLm_505gqLhs';
//$url='https://www.googleapis.com/latitude/v1/currentLocation?key='.$userkey.'&amp;type=json';

$userId = '30811844108.apps.googleusercontent.com';

$url = 'http://www.google.com/latitude/apps/badge/api?user='.$userId.'&amp;type=json';
$content = file_get_contents( $url );
$json = json_decode( $content );
$coord = $json-&gt;features[0]-&gt;geometry-&gt;coordinates;

$lat = $coord[1];
$lon = $coord[0];

echo $lat.' x '.$lon;

//$newurl="http://jecrcgps.betu.tk/data.php?lat=$lat&amp;lon=$lon";
//header("location: $newurl");exit;
?&gt;
</code></pre>
