<meta http-equiv="Content-Type" content="text/HTML; charset=utf-8" />
<?php
setlocale(LC_TIME,"turkish"); $tarih = strftime("%d %B %Y %A");
function siteConnect($site)
{
$ch = curl_init();
$hc = "YahooSeeker-Testing/v3.9 (compatible; Mozilla 4.0; MSIE 5.5; Yahoo! Search - Web Search)";
curl_setopt($ch, CURLOPT_REFERER, 'http://www.google.com');
curl_setopt($ch, CURLOPT_URL, $site);
curl_setopt($ch, CURLOPT_USERAGENT, $hc);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$site = curl_exec($ch);
$bugun = date("Y-m-d");
$yenitarih = strtotime('+3 day',strtotime($bugun));
$yenitarih = date('d' ,$yenitarih );
echo $tarih;
curl_close($ch);
// Veriyi parçalama işlemi
preg_match_all('@<td id="cp_sayfa_thmMax1" class="maxS">(.*?)</td>@si',$site,$veri_derece1);
preg_match_all('@<td id="cp_sayfa_thmMax2" class="arkaAlter maxS">(.*?)</td>@si',$site,$veri_derece2);
preg_match_all('@<img id="cp_sayfa_imgHadise1(.*?)>@si',$site,$veri_derece3);
echo "<br><b>Erzincan:</b>";
echo "<br><b>Bugun:</b>";
echo $veri_derece1[0][0];
echo "<br><b>Yarın:</b>";
echo $veri_derece2[0][0];
echo "<br><b>3.Gün:</b>";
echo $veri_derece3[0][0];
}
$giris = siteConnect('http://www.mgm.gov.tr/tahmin/il-ve-ilceler.aspx?m=ERZINCAN');
echo $giris;
?>bu kodlarla çekiyorum dediğim gbi önemli olan sadece o resmin alt="" değerini çekip ekrana yazdırmak arkadaşlar