bank internasional indonesia

Buat sebuah script baru dengan nama bankbii.php, lalu tambahkan script dibawah ini

function fungsiCurl($url){
     $data = curl_init();
     curl_setopt($data, CURLOPT_RETURNTRANSFER, 1);
     curl_setopt($data, CURLOPT_URL, $url);
     curl_setopt($data, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv: Gecko/20070725 Firefox/");
     $hasil = curl_exec($data);
     return $hasil;
$url = fungsiCurl('');
$pecah = explode('<td valign="top"><div WebPartID="47aac43c-aef3-4ed2-b181-25b45d34d110" HasPers="false" id="WebPartctl00_m_g_47aac43c_aef3_4ed2_b181_25b45d34d110" width="100%" class="ms-WPBody" allowDelete="false" allowExport="false" style="" ><div id="ctl00_m_g_47aac43c_aef3_4ed2_b181_25b45d34d110">',$url);
$pecah2 = explode('</table></td>',$pecah[1]);
echo "<table border=1>";
echo "</table>";

Jalankan script tersebut di browser, hasilnya seperti gambar dibawah ini
kurs bank international indonesia

[Download not found]

Mengambil Kurs Mata Uang Dari Bank Internasional Indonesia dengan PHP
Tagged on:     

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>