Guest User

Code

a guest
Aug 24th, 2012
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. <?php
  2.  
  3. function bacaHTML($url){
  4. // inisialisasi CURL
  5. $data = curl_init();
  6. // setting CURL
  7. curl_setopt($data, CURLOPT_RETURNTRANSFER, 1);
  8. curl_setopt($data, CURLOPT_URL, $url);
  9. // menjalankan CURL untuk membaca isi file
  10. $hasil = curl_exec($data);
  11. curl_close($data);
  12. return $hasil;
  13. }
  14.  
  15. $isine = bacaHTML('http://www.mahesajenar.com/scripts/ayat.php');
  16. $bersih= explode('<b>', $isine);
  17. $bersih= str_replace("document.write(", "", $bersih);
  18. $bersih= str_replace("widget lain", "", $bersih);
  19. $bersih= str_replace("<br/><br/><a href='http://widgets.mahesajenar.com/'></a>", "", $bersih);
  20. $bersih= str_replace("</strong>", "", $bersih);
  21. $bersih= str_replace("<br /><strong>", "", $bersih);
  22. $bersih= str_replace(");", "", $bersih);
  23. echo "$bersih[0]";
  24.  
  25. ?>
Advertisement
Add Comment
Please, Sign In to add comment