$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13');
curl_setopt($ch, CURLOPT_URL, 'http://www.google.com/ig/api?hl=ru&weather=moscow');
$xml = curl_exec($ch);
curl_close ($ch);
if($xml!=""){
file_put_contents("weather.xml", $xml);
}