ip to location, google weather api

$ip = $_SERVER[‘REMOTE_ADDR’];
$tags = get_meta_tags(‘http://www.geobytes.com/IpLocator.htm?GetLocation&template=php3.txt&IpAddress=’.$ip);

$xml = simplexml_load_file(‘http://www.google.com/ig/api?weather=’.$tags[‘city’]);
$information = $xml->xpath(“/xml_api_reply/weather/forecast_information”);
$current = $xml->xpath(“/xml_api_reply/weather/current_conditions”);
$forecast_list = $xml->xpath(“/xml_api_reply/weather/forecast_conditions”);

Advertisements