住所から簡単にジオコードを調べる方法

こんな方法もあるが、処理上でジオコードを取得したいときは

$address = '東京都目黒区中目黒2-10-15';
$geocode=file_get_contents('http://maps.google.com/maps/api/geocode/json?address='.urlencode($address).'&sensor=false');
$output= json_decode($geocode);

$lat = $output->results[0]->geometry->location->lat;
$long = $output->results[0]->geometry->location->lng;
echo $lat.','.$long;

出力:

35.6406465,139.7027264

確認して見ると、
http://maps.google.com/maps?q=35.6406465,139.7027264&hl=en&ll=35.640662,139.702706&spn=0.027413,0.042272&sll=37.0625,-95.677068&sspn=54.093296,86.572266&vpsrc=6&t=m&z=15