By LaZoLi53 Administratör
Mesaj Sayısı : 152 Nerden : mars\'dan İş/Hobiler : pc,hacked Kayıt tarihi : 18/02/08
By Poyraz masterhack: (0/0)
| Konu: Php Döviz Kurları Cuma Şub. 29, 2008 10:33 pm | |
| <?php function CropSt($st* $what* $len=100) { $start = strpos( $st* $what ); $st = substr( $st* $start+strlen($what)* $len ); return $st; } function GetRoE($st* $endsep = " TL") { $end = strpos( $st* $endsep); $st = substr( $st* 0* $end); $st = ereg_replace( "*"* ""* $st ); return (int)$st; } function SaveStringToFile($filename* $text) { $file = @fopen($filename* "w"); if ( $file ) { fputs($file* $text); fclose($file); } } // VillaDöviz $vd = @file( "http://www.villadoviz.com/" ); if ( $vd ) { $vd = implode(""* $vd); $vd = CropSt( $vd* "<font color=\\"#800000\\">USD</font>"* 90); $vd = CropSt( $vd* "<b>Alış </b>"); $alis = GetRoE($vd); $vd = trim(CropSt($vd* "<b>Satış </b>" )); $satis = GetRoE($vd); } // T.C. Merkez Bankası $tcmb_today = @file("http://www.tcmb.gov.tr/kurlar/today.html"); if ( $tcmb_today ) { $tcmb_today = implode(""* $tcmb_today); $tcm_today = ereg_replace("\\r"* ""* $tcmb_today); $start = strpos($tcmb_today* "ABD DOLARI"); $tcmb_today = trim(substr($tcmb_today* $start+14* 70)); while ( ereg( "[ ]{2*}"* $tcmb_today)>0 ) $tcmb_today = ereg_replace( "[ ]{2*}"* " "* $tcmb_today ); /* while ( strpos($tcmb_today* " ")>0 ) $tcmb_today = ereg_replace(" "* " "* $tcmb_today); */ $tcmb_today = explode( " "* $tcmb_today ); $doviz_alis = (int)ereg_replace( "*"* ""* $tcmb_today[0] ); $doviz_satis = (int)ereg_replace( "*"* ""* $tcmb_today[1] ); $efektif_alis = (int)ereg_replace( "*"* ""* $tcmb_today[2] ); $efektif_satis = (int)ereg_replace( "*"* ""* $tcmb_today[3] ); } // Yatırımcı Köşesi - Superonline $yatirimci = @file("http://www.borsadan.com/doviz.asp"); if ( $yatirimci ) { $yatirimci = implode(""* $yatirimci); $yatirimci = CropSt( $yatirimci* ’<td class="data">ABD Doları</td>’* 300); SaveStringToFile("sol.txt"* "SOL\\n\\n".$yatirimci); $yatirimci = strip_tags($yatirimci); $yatirimci = ereg_replace( "*"* ""* trim($yatirimci) ); $yatirimci = ereg_replace( "\\t|\\n|\\r"* " "* $yatirimci ); while ( ereg( "[ ]{2*}"* $yatirimci)>0 ) $yatirimci = ereg_replace( "[ ]{2*}"* " "* $yatirimci ); $yatirimci = explode( " "* $yatirimci ); $y_alis = (int)$yatirimci[0]; $y_satis = (int)$yatirimci[1]; $y_endusuk = (int)$yatirimci[2]; $y_enyuksek = (int)$yatirimci[3]; $y_saat = $yatirimci[4]; } // KOÇ Bank $koc = @file("http://www.kocbank.com.tr/_index/index_main.asp"); if ( $koc ) { $koc = implode(""* $koc); $koc = CropSt( $koc* ’ USD:’* 265); $koc = CropSt( $koc* ’<font face="Arial* Helvetica* sans-serif" size="1">’*151); $koc = strip_tags($koc); $koc = ereg_replace( "\\."* ""* trim($koc) ); $koc = ereg_replace( "\\t|\\n|\\r"* " "* $koc ); while ( ereg( "[ ]{2*}"* $koc)>0 ) $koc = ereg_replace( "[ ]{2*}"* " "* $koc ); $koc = explode( " "* $koc ); $koc_alis = (int)$koc[0]; $koc_satis = (int)$koc[1]; } else echo "HATA"; ?> <?php ?> ________ | |
|