Created
July 22, 2013 06:15
-
-
Save WenLiangTseng/6051646 to your computer and use it in GitHub Desktop.
PHP用HTTP request取得Google Map資訊的方法
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$url = 'http://maps.google.com/maps/geo?q=EC3M,+UK&output=csv&sensor=false'; | |
$data = @file_get_contents($url); | |
$result = explode(",", $data); | |
echo $result[0]; // status code | |
echo $result[1]; // accuracy | |
echo $result[2]; // latitude | |
echo $result[3]; // longitude |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment