// $sehir ="istanbul";
$Baglan = Baglan ("http://www.mynet.com/havadurumu/asya/turkiye/kocaeli");
$duzen = explode ('',$Baglan);
$duzen = explode ('',$duzen[1]);
$Baglan = $duzen[0];
preg_match_all('@(.*?)@si',$Baglan,$gunler);
preg_match_all('@(.*?)@si',$Baglan,$durum);
preg_match_all('@(.*?)@si',$Baglan,$yuksek);
preg_match_all('@(.*?)@si',$Baglan,$dusuk);
preg_match_all('@
'.$gunler[1][$i].''.$yuksek[1][$i].'/ '. $dusuk[1][$i].'°
';
}
?>
lazım olanlar için bu da curl codu:
//kocaeli yazan yeri kendi iliniz yapın.
//mehmeter046
//facelive
$url = "http://www.mynet.com/havadurumu/asya/turkiye/kocaeli";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$curl_scraped_page = curl_exec($ch);
curl_close($ch);
$Baglan = $curl_scraped_page;
$duzen = explode ('',$Baglan);
$duzen = explode ('',$duzen[1]);
$Baglan = $duzen[0];
preg_match_all('@(.*?)@si',$Baglan,$gunler);
preg_match_all('@(.*?)@si',$Baglan,$durum);
preg_match_all('@(.*?)@si',$Baglan,$yuksek);
preg_match_all('@(.*?)@si',$Baglan,$dusuk);
preg_match_all('@
'.$gunler[1][$i].''.$yuksek[1][$i].'/ '. $dusuk[1][$i].'°
';
}
?>