scriptz-team

[PHP] GOOGLE SCRAPER v0.1

Jun 3rd, 2012
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. <?php
  2. /*
  3. _____ _____ _ _____ _____ _____ _____ _____ _____
  4. ___| | __ |_| _ |_ _|___ ___|_ _| __| _ | |
  5. |_ -| --| -| | __| | | |- _|___| | | | __| | | | |
  6. |___|_____|__|__|_|__| |_| |___| |_| |_____|__|__|_|_|_|
  7. |s C R i P T z - T E A M . i N F O|
  8.  
  9. Google scraper
  10.  
  11. WARN:
  12. GOOGLE MAY BAN YOUR iP!
  13.  
  14. USAGE:
  15. Just run :P
  16. */
  17.  
  18. define("WTF", "powered by vbulletin"); //WTF = What To Find :D
  19. define("PN", "10"); //PG = Page Number
  20.  
  21. function get_url($url)
  22. {
  23. $ch = curl_init();
  24. $user_agent = "[N.i.X]";
  25. curl_setopt($ch, CURLOPT_URL, $url);
  26. curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
  27. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  28. $content = curl_exec($ch);
  29. curl_close($ch);
  30. return $content;
  31. }
  32.  
  33. function get_between($from, $to, $where, $position)
  34. {
  35. $x = explode($from, $where);
  36. $x = explode($to, $x[$position]);
  37. $x_ = $x[0];
  38. return $x_;
  39. }
  40.  
  41. for ($i = 1; $i <= 10; $i++) {
  42. $url = get_between('<p><a href="/url?q=', '&amp;', get_url("http://www.google.ca/search?q=".urlencode(WTF)."&hl=en&ie=UTF-8&prmd=xXx&ei=xXx&start=".PN."&sa=N"), $i);
  43. echo '<a href="' . $url . '">' . $url . '</a><br /><br />';
  44. }
  45. ?>
Add Comment
Please, Sign In to add comment