Advertisement
Guest User

Untitled

a guest
Apr 8th, 2019
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. <?php
  2.  
  3. $username = "testing123";
  4. $password = "testing123";
  5. $cookie="cookie.txt";
  6. $url="https://zalukaj.com/";
  7.  
  8.  
  9. $postdata = "username=".$username."&password=".$password;
  10.  
  11. $przegladarka = $_SERVER['HTTP_USER_AGENT'];
  12. $cr = curl_init();
  13. curl_setopt($cr, CURLOPT_URL, $url);
  14. curl_setopt($cr, CURLOPT_POSTFIELDS, $postdata);
  15. curl_setopt($cr, CURLOPT_USERAGENT, $przegladarka);
  16. curl_setopt($cr, CURLOPT_RETURNTRANSFER, 1);
  17. curl_setopt($cr, CURLOPT_FOLLOWLOCATION, 1);
  18. curl_setopt($cr, CURLOPT_POST, 1);
  19. //curl_setopt($cr, CURLOPT_PROXY, $proxy);
  20. //curl_setopt($cr, CURLOPT_PROXYPORT, $port);
  21. curl_setopt($cr, CURLOPT_COOKIEFILE, $cookie);
  22. curl_setopt($cr, CURLOPT_COOKIEJAR, $cookie);
  23. $page = curl_exec($cr);
  24. curl_close($cr);
  25.  
  26. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement