(02-13-2012, 03:26 PM)nesta Wrote:(02-13-2012, 12:27 PM)k1m8ut5 Wrote: blognya pakai apa?
subdomain wordpress.com apa hosting sendiri? atau blogspot?
buat naruh script php-ny
emang beda ya om wp sma belogspot? bukannya sama2 support php?
emangnya kita bisa naruh script php di blogspot ya??
caranya gimana?

@TS
coba ini : http://prastyo.com/demo/klasmen.php
scriptnya :
PHP Code:
<?
//halaman statistik
function bacaHTML($url_target) {
//inisialisasi CURL
$data = curl_init();
//setting curl
curl_setopt($data, CURLOPT_URL, $url_target);
curl_setopt($data, CURLOPT_RETURNTRANSFER, 1);
//menjalankan curl untuk membaca isi file
$hasil = curl_exec ($data);
curl_close ($data);
return $hasil;
}
$url_target = "http://www.detiksport.com/sepakbola/klasemen";
$kodeHTML = bacaHTML($url_target);
$atas = explode('<div class="content_interaktif box_1">',$kodeHTML);
$inggrisx = explode('<div class="hasil_pertandingan2 pt10" style="height: auto; display: block; overflow: hidden;">',$atas[1]);
$cumainggris= explode(' <div class="paging_1 right">',$inggrisx[2]);
echo "English Premier League";
echo $cumainggris[0];
English Premier League
No Team M M S K SG Nilai
1 Manchester City 25 19 3 3 64-19 60
2 Manchester United 25 18 4 3 61-25 58
3 Tottenham Hotspur 25 16 5 4 49-25 53
4 Arsenal 25 13 4 8 48-35 43
5 Chelsea 25 12 7 6 44-31 43
----update--
kok kalau di localhost bisa jalan ya,
kalau di hosting gak bisa, apa idhostinger gak ngebolehin curl



