/ Published in: PHP
                    
                                        
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
$address = '1 Sir Winston Churchill Square';
$city = 'edmonton';
$province = 'alberta';
$country = 'canada';
$postalcode = 'T5J 2R7';
// Google Geo Address
// Retrieve the URL contents
// Parse the returned XML file
$xml = new SimpleXMLElement($googlePage);
// Parse the coordinate string
// Output the coordinates
echo "Longitude: $longitude, Latitude: $latitude";
URL: http://www.adampatterson.ca/blog/2010/09/google-http-geocoding/
Comments
 Subscribe to comments
                    Subscribe to comments
                
                