<?php
function Baglan($link)
{
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$link);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch,CURLOPT_REFERER,"http://www.google.com.tr/");
curl_setopt($ch, CURLOPT_TIMEOUT, 9999999);
$Curl = curl_exec($ch); curl_close($ch);return $Curl;
}
?>
<?php
$il = "konya";
$Site = Baglan("http://www.havadurumu.com.tr/havadurumu/".$il."");
?>
<?php
preg_match_all('@<span class="cur_temp">(.*?)</span>@si',$Site,$veri_derece);
preg_match_all('@<span class="txt_graynote">Güncelleme:(.*?)</span>@si',$Site,$veri_guncel);
preg_match_all('@<div class="box_silver_down w250" style="height: 80px;">
<div class="left pl10" style="text-align: center;">
<img src="/icons/(.*?)"
alt="(.*?)" title="(.*?)" /></div>
@si',$Site,$veri_resim);
?>
<div id="blok-baslik"><h3>Konya Hava Durumu</h3></div>
<td>Konya:
<font size="2" face="Georgia, Times New Roman, Times, serif" style="text-shadow: 0px 1px 2px #666" color="#333333">
<?=$veri_derece[0][0]?></td>
<img src="http://www.havadurumu.com.tr/icons/<?=$veri_resim[1][0]?>" alt="" width="40" height="35" align="center"/>
<font size="2" face="Georgia, Times New Roman, Times, serif" style="text-shadow: 0px 1px 2px #666" color="#333333">Bu Şekilde kod oluşturabildim acemilikle ama index.php ye nasıl basacam tam mantık olarak çözemedim videolu derslerden Havadurumubotu.php olarak bunu yaptım ama index.php sayfasına basmak istiyorum ne yapmam gerekli msql bağlantısı mı yoksa değişkenlerle olur mu acaba