? GR0V Shell

GR0V shell

Linux www.koreapackagetour.com 2.6.32-042stab145.3 #1 SMP Thu Jun 11 14:05:04 MSK 2020 x86_64

Path : /home/admin/public_html/currency/
File Upload :
Current File : /home/admin/public_html/currency/currency.php

<!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-Type" content="text/html; charset=utf-8" />
<title>Currency rate</title>
<link rel="stylesheet" href="css/currency.css">
</head>

<body>
<div class="container">
<div style="font-weight:bold;color:#003664;">อัตราแลกเปลี่ยนเงิน</div>
<div>ประจำวันที่: <? echo date("m-d-y");?></div>
<table border="1" cellpadding="5" style="border-collapse:collapse;width:100%;">
<thead>
<tr>
<th style=" background-color:#2994c6;color:white;">สกุลเงิน/บาท</th>
<th style=" background-color:#2994c6;color:white;">อัตราแลกเปลี่ยนเฉลี่ย</th>
</tr>
</thead>
<tbody>
<tr>
<td class="currency">KRW</td>
<td class="rate"><? echo convertCurrency(1, "KRW", "THB");?></td>
</tr>
<tr>
<td class="currency">JPY</td>
<td class="rate"><? echo convertCurrency(1, "JPY", "THB");?></td>
</tr>
<tr>
<td class="currency">USD</td>
<td class="rate"><? echo convertCurrency(1, "USD", "THB");?></td>
</tr>
</tbody>
</table>

<?
function convertCurrency($amount, $from, $to){
    $url  = "https://www.google.com/finance/converter?a=$amount&from=$from&to=$to";
    $data = file_get_contents($url);
    preg_match("/<span class=bld>(.*)<\/span>/",$data, $converted);
    $converted = preg_replace("/[^0-9.]/", "", $converted[1]);
    return round($converted, 3);
}
?>
</div>
</body>
</html>

T1KUS90T
  root-grov@210.1.60.28:~$