PHP Classes

Error in Class

Recommend this page to a friend!

      PHP Free GeoIP Location  >  All threads  >  Error in Class  >  (Un) Subscribe thread alerts  
Subject:Error in Class
Summary:Error Message Line 35 and 47
Messages:5
Author:Enrico Hartwig
Date:2013-05-27 18:38:20
Update:2013-05-28 21:57:35
 

  1. Error in Class   Reply   Report abuse  
Picture of Enrico Hartwig Enrico Hartwig - 2013-05-27 18:38:20
Hi, maybe I'm a little bit stupid. If I open the PHP I get the following Error Message.

Warning: http_build_query() expects at least 1 parameter, 0 given in C:\xampp\htdocs\phpinfo\geolocation\geoloc.php on line 35

Warning: file_get_contents(http://freegeoip.net/xml/::1): failed to open stream: HTTP request failed! HTTP/1.1 405 Method Not Allowed in C:\xampp\htdocs\phpinfo\geolocation\geoloc.php on line 47
Caught exception: Could not get a response from freegeoip.net0.0.0.0

I Must say, that I'm new in PHP. Pls help me.

Br, Rico

  2. Re: Error in Class   Reply   Report abuse  
Picture of Frederik Yssing Frederik Yssing - 2013-05-28 08:21:10 - In reply to message 1 from Enrico Hartwig
You can remove the $postdata completely that would take care of that issue.'

I will upload the fixes later.

  3. Re: Error in Class   Reply   Report abuse  
Picture of Frederik Yssing Frederik Yssing - 2013-05-28 09:58:33 - In reply to message 1 from Enrico Hartwig
I have uploaded a new php file with the right fixes

  4. Re: Error in Class   Reply   Report abuse  
Picture of Enrico Hartwig Enrico Hartwig - 2013-05-28 10:54:56 - In reply to message 3 from Frederik Yssing
Well, that's fine. Thanks a lot...

  5. Re: Error in Class   Reply   Report abuse  
Picture of Frederik Yssing Frederik Yssing - 2013-05-28 21:57:35 - In reply to message 4 from Enrico Hartwig
If you can use it, i am happy :)