Merhabalar , bugün basit bir script yayınlayacağım script değil hatta bir index sayfası kadar
Kullandığım api
https://www.doviz.com/api/v1/currencies/all/latest
Güncel Döviz Fiyatları Çeker
json decode ile yapılmıştır
Kullandığım api
https://www.doviz.com/api/v1/currencies/all/latest
Güncel Döviz Fiyatları Çeker
json decode ile yapılmıştır

<?php
$site = file_get_contents("https://www.doviz.com/api/v1/currencies/all/latest");
$ka = json_decode($site);
/// DOLAR
$american =$ka[0];
$isim = $american->full_name;
$satis = $american->selling;
$alis = $american->buying;
$birim = $american->code;
/// EURO
$euro =$ka[1];
$isim1 = $euro->full_name;
$satis1 = $euro->selling;
$alis1 = $euro->buying;
$birim1 = $euro->code;
/// İNGİLİZ STERLİNİ
$ing =$ka[2];
$isim2 = $ing->full_name;
$satis2 = $ing->selling;
$alis2 = $ing->buying;
$birim2 = $ing->code;
/// İsviçre FRANGI
$ing =$ka[3];
$isim3 = $ing->full_name;
$satis3 = $ing->selling;
$alis3 = $ing->buying;
$birim3 = $ing->code;
/// İsveç KRONU
$ing =$ka[9];
$isim4 = $ing->full_name;
$satis4 = $ing->selling;
$alis4 = $ing->buying;
$birim4 = $ing->code;
/// Suriye Lirası
$ing =$ka[58];
$isim5 = $ing->full_name;
$satis5 = $ing->selling;
$alis5 = $ing->buying;
$birim5 = $ing->code;
/// Azerbeycan Manatı
$ing =$ka[32];
$isim6 = $ing->full_name;
$satis6 = $ing->selling;
$alis6 = $ing->buying;
$birim6 = $ing->code;
/// S. Arabistan Riyali
$ing =$ka[16];
$isim7 = $ing->full_name;
$satis7 = $ing->selling;
$alis7 = $ing->buying;
$birim7 = $ing->code;?>
<body bgcolor="black">
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css" rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
<div class="container">
<div class="row">
<title>Döviz Fiyatları</title>
<br><br><br><br>
<br>
<div class="col-md-10 col-md-offset-1">
<div class="panel panel-default panel-table">
<div class="panel-heading">
<center><strong><i class="fas fa-dollar-sign"></i> Güncel Fiyatlar <i class="fas fa-dollar-sign"></i></strong></center>
<div class="row">
<div class="col col-xs-6">
</div>
<div class="col col-xs-6 text-right">
</div>
</div>
</div>
<div class="panel-body">
<table class="table table-striped table-bordered table-list">
<thead>
<tr>
<th>Birimi</th>
<th>İsmi</th>
<th>Alış</th>
<th>Satış</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center"><strong><?php echo $birim; ?></strong></td>
<td align="center"><strong><?php echo $isim; ?></strong></td>
<td align="center"><strong style="color:red"><?php echo $alis; ?></strong></td>
<td align="center"><strong style="color:red"><?php echo $satis; ?></strong></td>
</tr>
<tr>
<td align="center"><strong><?php echo $birim1; ?></strong></td>
<td align="center"><strong><?php echo $isim1; ?></strong></td>
<td align="center"><strong style="color:red" ><?php echo $alis1; ?></strong></td>
<td align="center"><strong style="color:red"><?php echo $satis1; ?></strong></td>
</tr>
<tr>
<td align="center"><strong><?php echo $birim2; ?></strong></td>
<td align="center"><strong><?php echo $isim2; ?></strong></td>
<td align="center"><strong><?php echo $alis2; ?></strong></td>
<td align="center"><strong><?php echo $satis2; ?></strong></td>
</tr>
<tr>
<td align="center"><strong><?php echo $birim3; ?></strong></td>
<td align="center"><strong><?php echo $isim3; ?></strong></td>
<td align="center"><strong><?php echo $alis3; ?></strong></td>
<td align="center"><strong><?php echo $satis3; ?></strong></td>
</tr>
<tr>
<td align="center"><strong><?php echo $birim4; ?></strong></td>
<td align="center"><strong><?php echo $isim4; ?></strong></td>
<td align="center"><strong><?php echo $alis4; ?></strong></td>
<td align="center"><strong><?php echo $satis4; ?></strong></td>
</tr>
<tr>
<td align="center"><strong><?php echo $birim5; ?></strong></td>
<td align="center"><strong><?php echo $isim5; ?></strong></td>
<td align="center"><strong><?php echo $alis5; ?></strong></td>
<td align="center"><strong><?php echo $satis5; ?></strong></td>
</tr>
<tr>
<td align="center"><strong><?php echo $birim6; ?></strong></td>
<td align="center"><strong><?php echo $isim6; ?></strong></td>
<td align="center"><strong><?php echo $alis6; ?></strong></td>
<td align="center"><strong><?php echo $satis6; ?></strong></td>
</tr>
<tr>
<td align="center"><strong><?php echo $birim7; ?></strong></td>
<td align="center"><strong><?php echo $isim7; ?></strong></td>
<td align="center"><strong><?php echo $alis7; ?></strong></td>
<td align="center"><strong><?php echo $satis7; ?></strong></td>
</tr>
</table>
</tbody>
</div>
</div>
</div>
</div></div></div>
</body>


