I ran into the same problem, also couldn't do file_get_contents(), so I'm doing page-scraping of the XML. Very dirty but quick and works until Google changes the XML response for the geocoding request. But by then I hope to have PHP 5 in place.
You will need to adjust this to work with your stuff, but this is more or less how I utilize it.
$id = $row_Recordset1['id'];
$street = $row_Recordset1['strasse_nr'];
$city = $row_Recordset1['ort']; //unused as of now
$plz = $row_Recordset1['plz'];
$country = 'Germany';
Instead of doing very crude exploding, etc. you could be a little more clear when parsing out what you want.
For example, you could just use strpos to check for the status element containing "200". You could use string functions (strpos, substr, and the like) or regular expressions to get at the lat-lon coordinates.
Alternatively, depending on your needs, you could just use their CSV result format. I don't have PHP 4 to test against, but here is the idea:
Heh! Off topic, perhaps. I read $endpoint.urlencode($address); as some new fancy code. Only now I've put it into Zend Studio to test do I realise it's concatenation, but without the spaces, which threw me. For a moment I was thinking PHP had added a JS syntax.
You had me confused!
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.