• Bu site çerezler kullanır. Bu siteyi kullanmaya devam ederek çerez kullanımımızı kabul etmiş olursunuz. Daha fazla bilgi edin.

Php Döviz Kurları Botu

Konuyu Okuyan Kişiler (0)

FollowME

webmaster.tc
Katılım
3 Ocak 2013
Mesajlar
86
Beğeniler
0
#1
Merhaba Arkadaşlar Bir Temam İçin Yazdıgım Döviz Kurları Botu
buyrun
PHP:
<?php
header("Content-Type: text/html; charset=utf-8");

$url		=	"http://www.tcmb.gov.tr/kurlar/today.xml";
$xml 		=	simplexml_load_file($url);
$doviz 		=	array("alis"=>"","satis"=>"");
function getDoviz($veri){
global $doviz;
global $xml;
foreach ($xml as $kur)
{
if ($kur["Kod"]==$veri)
	{ 
	$doviz["alis"]=$kur->ForexBuying;
	$doviz["satis"]=$kur->ForexSelling;
	}
} return $doviz; }
$usd = getDoviz("USD");
$eur = getDoviz("EUR");
$gbp = getDoviz("GBP");
$cad = getDoviz("CAD");
$dkk = getDoviz("DKK");
$sek = getDoviz("SEK");
$chf = getDoviz("CHF");
$nok = getDoviz("NOK");
$jpy = getDoviz("JPY");
$aud = getDoviz("AUD");
$kwd = getDoviz("KWD");
$sar = getDoviz("SAR");

?>
<!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">

<head>
<meta http-equiv="Content-Language" content="tr" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>DÖVİZ KURLARI</title>
<style type="text/css">
.doviz1 {
				color: #FFFFFF;
}
.doviz2 {
				text-align: center;
}
</style>
</head>

<body>

<div style="width: 675px; height: 110px; padding-left:0px;">
				<table style="width: 675px" bgcolor="#0C3" class="doviz1" align="center">
								<tr>
												<td style="width: 120px" class="doviz2">
												<strong>DÖVİZ KURLARI</strong></td>
												<td style="width: 110px" class="doviz2">
												<strong>Dolar</strong></td>
												<td style="width: 110px" class="doviz2">
												<strong>Euro</strong></td>
												<td style="width: 110px" class="doviz2">
												<strong>Sterlin</strong></td>
												<td style="width: 110px" class="doviz2">
												<strong>Japon Yeni</strong></td>
												<td style="width: 110px" class="doviz2">
												<strong>İsviçre Frangı</strong></td>
								</tr>
				</table>
				<div style="height: 1px"></div>
				<table style="width: 675px" bgcolor="#C0C0C0" class="doviz2">
								<tr>
												<td style="width: 120px" class="doviz2">
												<strong>ALIŞ:</strong></td>
												<td style="width: 110px" class="doviz2">
												<strong><?echo $usd["alis"];?></strong></td>
												<td style="width: 110px" class="doviz2">
												<strong><?echo $eur["alis"];?></strong></td>
												<td style="width: 110px" class="doviz2">
												<strong><?echo $gbp["alis"];?></strong></td>
												<td style="width: 110px" class="doviz2">
												<strong><?echo $jpy["alis"];?></strong></td>
												<td style="width: 110px" class="doviz2">
												<strong><?echo $chf["alis"];?></strong></td>
								</tr>
				</table>
					<table style="width: 675px" bgcolor="#C0C0C0" class="doviz2">
								<tr>
												<td style="width: 120px" class="doviz2">
												<strong>SATIŞ:</strong></td>
												<td style="width: 110px" class="doviz2">
												<strong><?echo $usd["satis"];?></strong></td>
												<td style="width: 110px" class="doviz2">
												<strong><?echo $eur["satis"];?></strong></td>
												<td style="width: 110px" class="doviz2">
												<strong><?echo $gbp["satis"];?></strong></td>
												<td style="width: 110px" class="doviz2">
												<strong><?echo $jpy["satis"];?></strong></td>
												<td style="width: 110px" class="doviz2">
												<strong><?echo $chf["satis"];?></strong></td>
								</tr>
				</table>


</div>

</body>

</html>
Gülegüle Kullanın....