Page 1 of 1
unable to fetch content from a URL
Posted: Wed Jan 23, 2008 8:41 am
by jaini
i am trying to connect this URL to get latitude, longitude of a state
but its throwing warning can u pls tell me what would be the reason
"Warning: file_get_contents(
http://maps.google.com/maps/geo?&q=Dist ... HqrFcWo5vA) [function.file-get-contents]: failed to open stream: Permission denied in GoogleMapAPI.class.php on line 1343"
Re: unable to fetch content from a URL
Posted: Wed Jan 23, 2008 9:55 am
by Chalks
jaini wrote:i am trying to connect this URL to get latitude, longitude of a state
but its throwing warning can u pls tell me what would be the reason
"Warning: file_get_contents(
http://maps.google.com/maps/geo?&q=Dist ... HqrFcWo5vA) [function.file-get-contents]: failed to open stream: Permission denied in GoogleMapAPI.class.php on line 1343"
I would venture to guess that Google doesn't like people to take their data without permission:
"Permission denied in GoogleMapAPI.class.php"
Re: unable to fetch content from a URL
Posted: Wed Jan 23, 2008 11:15 pm
by jaini
i registered my site url with google and i got API key also. i implemented the same on windows and its working fine. on linux server i am getting warning
Re: unable to fetch content from a URL
Posted: Thu Jan 24, 2008 1:07 am
by Kieran Huggins
they authenticate you by your url - make sure you have the domain / directory correct for your linux machine also.
Re: unable to fetch content from a URL
Posted: Thu Jan 24, 2008 1:30 am
by jaini
should i change any settings in httpd.conf? so that server can connetct a remote server and it can fetch data.
Re: unable to fetch content from a URL
Posted: Thu Jan 24, 2008 1:33 am
by Christopher
Can you use file_get_contents() for that? Maybe you need to use cURL.
Re: unable to fetch content from a URL
Posted: Thu Jan 24, 2008 1:50 am
by jaini
i tried with the all ways(file_get_contents, CURL, fsocket )
but getting same warning messge