Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- global $lang;
- global $lat;
- /*** REMEMBER to use your own API key ***/
- $apikey = "INSERT KEY HERE";
- $geourl = "http://maps.google.com/maps/geo?q=520+3rd+Street+San+Francisco+CA&output=csv&key=$apikey";
- // Create cUrl object to grab XML content using $geourl
- $c = curl_init();
- curl_setopt($c, CURLOPT_URL, $geourl);
- curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
- $csvContent = trim(curl_exec($c));
- curl_close($c);
- // Split pieces of data by the comma that separates them
- list($httpcode,$lng, $lat, $elev) = explode(",", $csvContent);
- echo($lng);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement