I'm trying to use a very simple script that I've been using for a while now:

PHP Code:

Function GetLatLng_old($Address,$Type){
$Request "http://maps.google.com/maps/geo?q=" urlencode($Address) . "&output=xml&key=" GOOGLE_MAP_KEY;
str_replace("|","",trim($Request)); exit;
$page file_get_contents($Request);
$xml = new SimpleXMLElement($page);
$Result $xml->Response->Placemark->Point->coordinates;
$LatLng explode(",",$Result);
$Type == "Lng") return $LatLng[0];
$Type == "Lat") return $LatLng[1];
as of the last few days this has stopped working and has started producing the following error:

[function.file-get-contents]:failed to open stream: HTTP request failed!

Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML'

I'm getting this same error with all remote type functions like fopen and others.

I've searched google and found this:

"To resolve the problem, ensure that allow_url_fopen is enabled in PHP.INI configuration file. The line should look like this:

allow_url_fopen = On"

on allow of forums, however thats not the issue in my case as this is enabled.

I'm running PHP Version 5.1.2 on Ubuntu, any ideas on what the issue might be would really help.

thanks in advance for your time!