This topic is locked

Where to put this code ?

7/1/2010 9:22:32 AM
PHPRunner General questions
P
Pierre DAC author

Hi,

Here is my code :

if ($_REQUEST[where]) {

$where = stripslashes($_REQUEST[where]);

$whereurl = urlencode($where);

// Note - Google key is domain specific!

$location = file("http://maps.google.com/maps/geo?q=$whereurl&output=csv&key=MYGOOGLEKEY";);

list ($stat,$acc,$north,$east) = explode(",",$location[0]);

$html = "Information for ".htmlspecialchars($where)."
";

$html .= "North: $north, East: $east
";

$html .= "Accuracy: $acc, Status: $stat
";

} else {

$html = "Space reserved for your report when form completed";

}


$where is the name of my address field.
What I'm trying to do :

I write my location in address field.

I click a button on the page.

Phprunner put $north variable into the field latitude and put $east variable into field longitude.
Many thank's if you could help me (two days of works, no result)...

Best regards

Sergey Kornilov admin 7/1/2010

Since this is a Google Maps API question you can have better luck asking it in Google Group dedicated to this topic: http://groups.google.com/group/Google-Maps-API?pli=1