Last active
November 10, 2017 00:25
-
-
Save aruaruaru/18d0e42c3548eb9611ede222a13a823d to your computer and use it in GitHub Desktop.
jurnal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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