Skip to content

Instantly share code, notes, and snippets.

@aruaruaru
Last active November 10, 2017 00:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aruaruaru/18d0e42c3548eb9611ede222a13a823d to your computer and use it in GitHub Desktop.
Save aruaruaru/18d0e42c3548eb9611ede222a13a823d to your computer and use it in GitHub Desktop.
jurnal
<?php
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);
curl_close($data);
return $hasil;
}
$kodeHTML = bacaHTML('http://jurnal.umk.ac.id/index.php/simet'); //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