temporaneità
English scratches and Italian notes written by Carlo Perassi
  • About
    • Borges
  • Curriculum Vitae
  • Contact
Browse: Home / geocoding

geocoding

Geocoding behind a proxy

By Carlo on 2009-03-02

The official PHP/MySQL Google Maps Geocoding example uses simplexml_load_file that doesn’t handle a proxy so if your script is behind a proxy, you can’t use it. The problem can be overcome by using stream_context_create and file_get_contents as described in the following snippet: $request_url = $base_url . "&q=" . urlencode($address); $params = array ( ‘http’ => [...]

Posted in English | Tagged geocoding, Google maps, PHP, proxy | Leave a response

Search

It passes

it passes

My posts, unless otherwise expressly stated, are licensed under a Creative Commons Attribution-Share Alike 2.5 Italy License.

Copyright © 2006 - 2012 by Carlo Perassi. Powered by WordPress and Hybrid.