Guest User

Untitled

a guest
Jun 28th, 2013
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.78 KB | None | 0 0
  1. <?php
  2. $RST = file_get_contents("https://rstforums.com");
  3. $RST = explode(" <div id=\"tab-1\">",$RST);
  4. $RST = explode("</div>",$RST[1]);
  5. $RST = explode("<li>",$RST[0]);
  6. unset($RST[0]);
  7. foreach($RST as $thread){
  8. $thread = explode("\"",$thread);
  9. $thr['link']  = $thread[3];
  10. $tid = explode("t=",$thr['link']);
  11. $tid = explode("&",$tid[1]);
  12. $thr['tid'] = $tid[0];
  13. $pid = explode("p=",$thr['link']);
  14. $thr['pid'] = $pid[1];
  15. $title = explode(">",$thread[6]);
  16. $title = explode("</",$title[1]);
  17. $thr['title'] = $title[0];
  18. $author = explode("> ",$thread[10]);
  19. $author = explode(" </",$author[1]);
  20. $thr['author'] = $author[0];
  21. $topic = explode(">",$thread[12]);
  22. $topic = explode("</",$topic[2]);
  23. $thr['topic'] = $topic[0];
  24. $thrs[] = $thr;
  25. }
  26. print_r("threads=".json_encode($thrs));
  27. ?>
Advertisement
Add Comment
Please, Sign In to add comment