header("content-type:text/html;charset=utf-8");
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.dmi.gov.tr/tahmin/il-ve-ilceler.aspx?m=MAMAK");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$cek = curl_exec($ch);
$cek = iconv("UTF-8","windows-1254",$cek);
curl_close($ch);
preg_match("##si",$cek,$b);
preg_match("# (.*?)preg_match("# (.*?)
([0-9:]+)<\/td>#si",$c[0],$d);
preg_match_all("# (.*?) #si",$c[0],$e);
preg_match("#
(.*?) #si",$c[0],$f);
preg_match("#(.*?) #si",$c[0],$a);
?>
Hava Durumu
Sıcaklık =$a[2];?>
Nem =$e[1][0];?>
Basınç =$e[1][1];?>
Görüş =$e[1][2];?>
Rüzgar =$f[4];?>
dil sorunu yaşayanlar şu kodları silsinler:
header("content-type:text/html;charset=utf-8");
$cek = iconv("UTF-8","windows-1254",$cek);