hello,

saya belum pakek wordpress, males.. tapi bisakan sisipkan script php?

buka notepad, lalu kcopy and paste dan save sebagai file php.
*.php

scriptnya:

<?

//script menampilkan mata uang dari klik BCA.
//Modified by aris yohanes
//#yogyafree & kartunet.com

//mulai ambil URL
$url = strip_tags("http://www.klikbca.com/corporate/Ind/rates.html";);

//akses klikBCA dgn fungsi CURL
$ch = curl_init();
$timeout = 5;
 curl_setopt ($ch, CURLOPT_URL, $url);
 curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
 curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
 $output = curl_exec($ch);
 curl_close($ch);
echo $output . "<p><p><p>";
//mulai start dari posisi <table dekat kurs uang pada hasil download file 
dari klikBCA

$html_start = '<table border="0" cellspacing="0" cellpadding="0" 
class="testL">';

//tentukan batas akhir pemotongan isi
//dan pemotongan berakhir pada baris ini:
$html_end = '<br> </font> </td>';
//yang artinya <br> </font> </td> tidak diambil

//periksa apakah $output benar2 berisi hasil dari URL klikBCA
if ($output != '')
//bila variabel tidak kosong maka lakukan aksi pemotongan

 {
$a = strpos($output, $html_start) ;
$b = strpos($output, $html_end) - $a ;
$show = substr($output, $a, $b) ;

//nah, anda tinggal ganti2 nilai dari $show pada fungsi ereg_replace() buat 
menganti tag yang asli sesuai kebutuhan
$show = ereg_replace($html_start, '<table border=0 cellspacing=1 
cellpadding=1 width=160>', $show) ;
$show = ereg_replace("BGCOLOR=\'#f0f0f0\'", "BGCOLOR='#dcdcdc'", $show) ;
$show = ereg_replace("bgcolor=\"#ff9c00\"", "", $show) ;
$show = ereg_replace("white", "#000000", $show) ;
$show = ereg_replace("bgcolor=\'#e0e0e0\'", "bgcolor='#cccccc'", $show) ;
$show = ereg_replace("<td valign=\"top\" align=\"left\">", "<td 
valign=\"top\" align=\"left\" style=\"font-weight:bold\">", $show) ;
$show = ereg_replace("<table border=\"0\" cellspacing=\"0\" 
cellpadding=\"0\" class=\"testL\">", "<table border=\"0\" cellspacing=\"1\" 
cellpadding=\"1\">",
$show) ;
$show = ereg_replace("\"#0000a0\"", "#000000", $show) ;
$show = ereg_replace("<font color=\"#000000\" size=\"2\" face=\"Verdana\">", 
"<font face=\"Verdana\" style=\"font-size: 8pt\">", $show) ;
$show = ereg_replace("<font face=\"Arial\" size=\"2\" color=#000000>", 
"<font face=\"Verdana\" style=\"font-size: 8pt; font-weight=bold\">", $show) 
;
$show = ereg_replace("<strong>DD/TT</strong><br>", "", $show) ;
$show = ereg_replace("Mata Uang", "", $show) ;

//ok, sekarang tampilkan hasilnya
print "$show";

}

//selesai dah..
?>

Regards,

                    Aris

Open an account on moneybookers now, and you'll get many benefits!
https://www.moneybookers.com/app/?rid=8440199

MSN: aris-yoha...@hotmail.com
Skype: aris-yohanes
YM ID: aris_program...@yahoo.com
SITE: http://www.kartunet.com

----- Original Message ----- 
From: "bL4cK_K4p0Ld4" <bl4ck_k4p0...@yahoo.com>
To: <yogyafree-perjuangan@yahoogroups.com>
Sent: Monday, January 19, 2009 11:24 PM
Subject: [YF] [TANYA] Kode Kurs BCA untuk Widget di Wordpress


> Rekan2 sekalian...
>
> Ada yang tahu link/punya kode script kurs nilai tukar mata uang dari BCA 
> untuk dipasang di widget Wordpress gk?
>
> Trims atas masukannya.
>
>
>
> From : bL4cK_K4p0Ld4
> http://black-kapolda.co.cc
>
>
>
>
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus 
> signature database 3733 (20090102) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
> 

Reply via email to