RAJASA - Wireless Internet Service Provider / Penyedia Layanan dan Jasa Internet Nirkabel

 

Kurs Rupiah

get( 'MAX_AGE', 20) ); $NamaFile = $params->get( 'NamaFile', '' ); $height = $params->get( 'height',20 ); $width = $params->get( 'width', 20 ); global $mosConfig_absolute_path, $mosConfig_cachepath; $cacheFile = $mosConfig_cachepath . '/' . $NamaFile; ?>
$age) { print "$contents"; // cache masih bisa dipakai $PakaiCache=1; flush() ; } } If (!$PakaiCache) { // Cache lebih dari $MAX_AGE jadi coba ambil yang baru $url = "http://www.klikbca.com/corporate/Ind/rates.html" ; $html_start = ''; $html_end = ''; ini_set ('allow_url_fopen', '1' ); ini_set ('auto_detect_line_endings', 'Off') ; ini_set ('default_socket_timeout', '30' ); ini_set ('max_execution_time', '0' ); flush() ; $f = fopen ($url, 'r' ); $doc = ''; while (! feof ($f) ) { $doc = $doc . fgets($f, 3072) ; // triple buffer, default buffer 1024 bytes dirubah menjadi 3072 bytes, // krn di file $url dicek ada line yg panjang sekali, > 2 KB } fclose ($f) ; if ($doc != '') { // hasil tidak kosong, strip semuanya $a = strpos($doc, $html_start) ; $b = strpos($doc, $html_end) - $a ; $show = substr($doc, $a, $b) ; $show = ereg_replace($html_start, '
', $show) ; $show = ereg_replace("bgcolor=\"#6699CC\"", "", $show) ; $show = ereg_replace("bgcolor=\"#ff9c00\"", "", $show) ; $show = ereg_replace("white", "#000000", $show) ; $show = ereg_replace("bgcolor=\'#e0e0e0\'", "", $show) ; $show = ereg_replace("\"#0000a0\"", "#000000", $show) ; $show = ereg_replace("", "", $show) ; $show = ereg_replace("", "", $show) ; $show = ereg_replace("DD/TT", "", $show) ; $show = ereg_replace("Mata Uang", "Duit", $show) ; $show = ereg_replace("Duit", "Kurs", $show) ; $show = ereg_replace("Jual", "Jual", $show) ; $show = ereg_replace("Beli", "Beli", $show) ; $show = ereg_replace("
", "", $show) ; $show = ereg_replace(" ", "", $show) ; $show = ereg_replace("
", "", $show) ; $show = ereg_replace("
", "
", $show) ; print "$show" ; flush() ; // Update cache file $fp = fopen($cacheFile, "w"); fwrite ($fp, $show); } else { // gagal dalam pengambilan data, jadi ambil cache lagi $fp = fopen($cacheFile, "r"); $contents = fread($fp, filesize($cacheFile)); fclose($fp); print "$contents"; // cache masih bisa dipakai flush() ; } } #berakhir ?>

Pengetahuan & Teknologi

Telekomunikasi & Internet

Google Page Rank
website monitoring service