Güncel İMKB, Dolar, Euro Kurlarını Otomatik Olarak Çekiyor . Biraz Css Düzenlemesi İle Hoş Bir Şekilde Kullanılabilir. DEMO <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTf-8" />
<title>Kur</title>
<style type="text/css">
body {background:#fff;font:12px Arial}
input[type=text] {display:block;font:11px Verdana;color:red;width:150px;height:20px}
input[type=submit] {border-radius:5px;background-color:#fff;height:40px}
.esit {
background:url(img/normal.png) no-repeat;
width:47px;
height:32px;
display:inline-block;
position:relative;
top:10px;
right:25px;
}
.yukseldi {
background:url(img/arti.png)no-repeat;
width:32px;
height:47px;
display:inline-block;
}
.dustu {
background:url(img/eksi.png)no-repeat;
width:32px;
height:47px;
display:inline-block;
}
.kur {
font-size:16px; font-family : Arial;
font-weight:bold;
display:inline-block;
}
.deger {
color:#0C3;
font-size:14px;
font-style:italic;
display:inline-block;
position:relative;
top:20px;
right:50px;
}
</style>
</head>
<body>
<!--,PREG_SET_ORDER-->
<?php
$site = file_get_contents ('http://piyasa.com/');
$regEx = '@<strong>(.*?)</strong>@si';
$regEx2 = '@<img src="http://piyasa.com/img/icons/(.*?)">@si';
preg_match_all ($regEx,$site,$kur);
preg_match_all ($regEx2,$site,$degisim);
?>
<div class='kur'>İMKB</div><div class='deger>'><?= $kur[0][0]?></div><?=$degisim[0][0]?>
<div class='kur'>DOLAR</div><div class='deger>'><?= $kur[0][1]?></div><?=$degisim[0][1]?>
<div class='kur'>EURO</div><div class='deger>'><?= $kur[0][2]?></div><?=$degisim[0][2]?>
</body>
</html>