Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Nov 28th, 2012  |  syntax: None  |  size: 1.28 KB  |  views: 34  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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