Advertisement
Guest User

Untitled

a guest
Nov 28th, 2012
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. <?php
  2. error_reporting(0);
  3. ini_set('max_execution_time', 5000);
  4. $user=$_GET['uid'];
  5. $pass=$_GET['pass'];
  6.  
  7. $agent = "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7";
  8. $ch = curl_init();
  9. curl_setopt($ch, CURLOPT_URL,"my-url");
  10. curl_setopt($ch, CURLOPT_USERAGENT, $agent);
  11. curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: application/x-www-form-urlencoded","Accept: */*"));
  12. curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
  13. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  14. curl_setopt( $ch, CURLOPT_AUTOREFERER, 1);
  15. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  16. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
  17. curl_setopt($ch, CURLOPT_POST, true);
  18. curl_setopt($ch, CURLOPT_POSTFIELDS,
  19. "My-Post-fields");
  20. $html=curl_exec($ch);
  21.  
  22. curl_setopt($ch, CURLOPT_URL,"another-url");
  23. curl_setopt($ch, CURLOPT_USERAGENT, $agent);
  24. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  25. $html = curl_exec($ch);
  26.  
  27. $doc = new DOMDocument();
  28. @$doc->loadHTML($html);
  29. $links = $doc->getElementsByTagName('a');
  30. foreach ($links as $link) { $p[$i++]=$link->getAttribute('href'); }
  31.  
  32.  
  33. ------ and so on
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement