Skip to content

Instantly share code, notes, and snippets.

Last active Nov 10, 2017
What would you like to do?
function bacaHTML($url){
// inisialisasi CURL
$data = curl_init();
// setting CURL
curl_setopt($data, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($data, CURLOPT_URL, $url);
// menjalankan CURL untuk membaca isi file
$hasil = curl_exec($data);
return $hasil;
$kodeHTML = bacaHTML(''); //sumber content
$pecah = explode('<table class="announcements">', $kodeHTML);
$pecahLagi = explode('</table>', $pecah[1]);
//css table sesuaikan dengan format css web anda
echo '<table class="announcements">'.$pecahLagi[0].'</table>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment