400 Bad Request

I’m trying to connect to the google weather API from a dreamhost server, but I’m getting “400 Bad Request” as a respone to “http://www.google.com/ig/api?weather=Austin, TX&hl=en” for example. It works from the command-line/terminal with wget, just not from apache on the server.

I’ve tried it in AJAX and PHP, here’s what it is now:

function getWeather($cityState) { $requestAddress = "http://www.google.com/ig/api?weather=" . $cityState . "&hl=en"; $xml_str = file_get_contents($requestAddress,0);

And here’s the response I get:

Anyone know what’s going on?

You overlooked something.

You rock good sir, thank you.