Ticket #506 (closed Bug: wontfix)
Gmap simplexml_load_file()
| Reported by: | samsoffes | Owned by: | - No owner - |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.1.2 |
| Component: | Modules | Version: | SVN HEAD |
| Keywords: | Cc: |
Description
The address_to_xml method in the Gmap module uses simplexml_load_file() which throws and error for me at (mt). For most PHP installs, that is disabled by default. cURL is a much better option.
$url = 'http://maps.google.com/maps/geo?'. '&output=xml'. '&key='.$api_key. '&q='.rawurlencode($address); $ch = curl_init(); $options[CURLOPT_URL] = $url; $options[CURLOPT_RETURNTRANSFER] = true; curl_setopt_array($ch, $options); $output = curl_exec($ch); curl_close($ch); $xml = new SimpleXMLElement($output);
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
