Hi,
I have implemented http://code.google.com/apis/maps/articles/phpsqlajax_v3.html
for a site i am working on.
(quick overview): There is a PHP file which queries a database and
pulls back the long and lat and names etc for my markers. That PHP
will output an xml file with the long and lat coords etc.
i then call my php file from a javascript file and parse the XML file
and create the markers and infoboxes from there.
I have that implemented.
What i would like is if someone visited the PHP file (that outputs the
XML data) directly that they will not be able to see the XML returned.
I found the code below, which looks perfect, in the PHP file - but it
doesnt work. $_SERVER['REMOTE_ADDR'] always returns my IP address
rather than the IP of the server.
if ($_SERVER['REMOTE_ADDR'] !== '127.0.0.1')
die(header("Location: /"));
If anyone can help.
Thanks.
--
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-api?hl=en.