Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8495463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:34:53+00:00 2026-06-10T23:34:53+00:00

if i understand the google error OVER_QUERY_LIMIT right, than it comes because of too

  • 0

if i understand the google error OVER_QUERY_LIMIT right, than it comes because of too many ip-requests.
BUT if I go to the browser and load the following link:
http://maps.googleapis.com/maps/api/geocode/xml?address=Paris&sensor=true

I can see the xml!

So why is that?

Do I have a problem in my code?

Here it is:

    $the_map = htmlspecialchars($_POST['map'], ENT_QUOTES);

    error_reporting(0);
    $map_query = file_get_contents('http://maps.google.com/maps/api/geocode/xml?address='.rawurlencode($the_map).'&sensor=false');
    error_reporting(1);

    if ($map_query){
        $geo_code = simplexml_load_string(utf8_encode($map_query));

        if ($geo_code){
            $map_lat = $geo_code->xpath("/GeocodeResponse/result/geometry/location/lat");
            $map_lng = $geo_code->xpath("/GeocodeResponse/result/geometry/location/lng");
            $map_lat = $map_lat[0][0];
            $map_lng = $map_lng[0][0];
        }
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T23:34:54+00:00Added an answer on June 10, 2026 at 11:34 pm

    Use curl instead of file_get_contents:

    $address = "India+Panchkula";
    $url = "http://maps.google.com/maps/api/geocode/json?address=$address&sensor=false&region=India";
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_PROXYPORT, 3128);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    $response = curl_exec($ch);
    curl_close($ch);
    $response_a = json_decode($response);
    echo $lat = $response_a->results[0]->geometry->location->lat;
    echo "<br />";
    echo $long = $response_a->results[0]->geometry->location->lng;
    

    Or See the below URL

    Warning while using file_get_contents for google api

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I already read the datasheet and google but I still don't understand something. In
Google App Engine just gave me an error I don't understand. Given a module
I donot understand why do I get this error because ZERO_RESULTS is a constant
I've google and read stackoverflow about 4 hours, but cannot understand, why test similar
I don't quite understand how Google Maps 's google.maps.LatLngBounds.isEmpty function works. What defines a
http://code.google.com/appengine/docs/python/tools/uploadingdata.html is not clearly understand. Where i should call the bulkloader.py or appcfg.py? Should
I know that google's v8 compiles javascript into native machine (binary if I understand
Has anybody used TreeMultimap in Google Collections? I understand that with a TreeMultimap, its
I am looking into authenticating via google. I dont understand how it works: http://code.google.com/apis/accounts/docs/OpenID.html#Samples
         I was looking at some APIs like twitter, google APIs. From what I understand

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.