Welcome Guest, Not a member yet? Register   Sign In
Google map doesn't work online
#11

[eluser]Omaplie[/eluser]
Sorry, no one can help me ?
I believed it could be the safe_mode but when I
enable this one in local, the map is still working.

Someone got an idea ?
#12

[eluser]LuckyFella73[/eluser]
Please insert this function into one of
your controllers and call the method get_xml.
Then heck the sourcecode in your browser.

You should see an xml string. If not its defenitly a
server issue (configuration/permission).

Code:
public function get_xml()
{
  $address = "http://maps.google.com/maps/geo?q=Gent,Belgien&output=xml";
  $address = utf8_encode($address);

  $ch = curl_init();        //Initialize the Curl session
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Set curl to return the data instead of printing it to the browser.
  curl_setopt($ch, CURLOPT_URL, $address);  //Set the URL
  $xml_data = curl_exec($ch);      //Execute the fetch
  curl_close($ch);        //Close the connection


  die($xml_data);
}
#13

[eluser]LuckyFella73[/eluser]
And check this code too - it's the way your library gets the xml:

Code:
$address = "http://maps.google.com/maps/geo?q=Gent,Belgien&output=xml";
  $xml_data = file_get_contents($address);
  die('fopen: '.$xml_data);

You can just replace the code inside the get_xml method and call it again.




Theme © iAndrew 2016 - Forum software by © MyBB