Bubelbub

Abload.de - PHP - CURL - Login

Apr 12th, 2013
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.81 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4.  * @author Bubelbub <[email protected]>
  5.  * @version 1.0.0
  6.  */
  7.  
  8. $username    = ''; // Insert your username here // hier kommt dein Benutzername hin
  9. $password    = ''; // Insert your password here // hier kommt dein Passwort hin
  10.  
  11. $ch = curl_init();
  12. curl_setopt($ch, CURLOPT_HEADER, 0);
  13. curl_setopt($ch, CURLOPT_VERBOSE, 0);
  14. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  15. curl_setopt($ch, CURLOPT_URL, 'http://www.abload.de/login.php?next=/');
  16. curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
  17. curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt');
  18. curl_setopt($ch, CURLOPT_POST, true);
  19. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  20.  
  21. $post = array(
  22.     'cookie'     => 'on',
  23.     'name'       => $username,
  24.     'password'   => $password
  25. );
  26.  
  27. curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
  28.  
  29. $response = curl_exec($ch);
Advertisement
Add Comment
Please, Sign In to add comment