", str_replace("/City", "City", $selstuff)); } else { $selstuff = file_get_contents("http://www.webservicex.net/globalweather.asmx/GetCitiesByCountry?CountryName=" . $_GET['CitiesViaCountry']); file_put_contents(dirname(__FILE__) . "/" . $thefile, str_replace("<","<",str_replace(">",">",$selstuff))); $selarray = explode("<City>", str_replace("/City", "City", $selstuff)); } $one = 1; $cities = array(); for ($i=1; $i" . $cities[$i - 1] . ""; if (($i % 10) == 0) $cityopts .= ""; } } else { $ans = ""; $place = ""; $country = ""; $sqs = ""; $cr = ""; if (isset($_GET['CityName']) && isset($_GET['CountryName'])) { $place = $_GET['CityName']; $country = $_GET['CountryName']; $sqs = $_SERVER['QUERY_STRING']; } else if (isset($_GET['place']) && isset($_GET['country'])) { $cr = "\n"; $place = $_GET['place']; $country = $_GET['country']; $sqs = "CityName=" . $place . "&CountryName=" . $country; } if ($sqs != "") { //exec("curl " . "http://www.webservicex.net/globalweather.asmx/GetWeather?" . $_SERVER['QUERY_STRING'] . " > " . dirname(__FILE__) . "/weather.xml"); //$ans = file_get_contents(dirname(__FILE__) . "/weather.xml"); //echo $ans; $ans = file_get_contents("http://www.webservicex.net/globalweather.asmx/GetWeather?" . $sqs); $ans2 = str_replace('<' . '/string>','',str_replace('<' . '?xml version="1.0" encoding="utf-16"?>','',str_replace("<","<",str_replace(">",">",$ans)))); $ans = str_replace('<' . '?xml version="1.0" encoding="utf-8"?>','',str_replace('<' . 'Status>Success','',$ans2)); $ans2 = str_replace('<' . 'CurrentWeather>','',str_replace('','',$ans)); $ans = str_replace('<' . 'CurrentWeather>','',str_replace('','',$ans2)); $ans2 = str_replace('','',str_replace('','',str_replace('','',str_replace('','',str_replace('','',str_replace('','',str_replace('','',str_replace('','',str_replace('','',$ans))))))))); for ($jj=0; $jj<15; $jj++) { $ans = str_replace(">",": ",str_replace("<",$cr,$ans2)); $ans2 = $ans; } echo str_replace("\n","
",$ans); exit(0); } } ?> Get the Weather via Global Weather with Country/City Auto-Completion ... http://www.webservicex.net/ ... thanks'; ?>

Hover (or Click) for weather from GlobalWeather

'; ?>
Parameter Value
CountryName:

' . $ans . ''; ?>