Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. <?php
  2.  
  3. $url="https://1xbetua.com/user/auth/";
  4. $urlTo="https://1xbetua.com/";
  5.  
  6. $post="uLogin=33589681&uPassword=737mbxk6&save=on&redirect=http://1xbetua.com";
  7.  
  8. $ch = curl_init();
  9. curl_setopt( $ch, CURLOPT_URL, $url);
  10. curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true);
  11. $result = curl_exec($ch);
  12. curl_setopt($ch, CURLOPT_HTTPHEADER, 'accept: application/json, text/javascript, */*; q=0.01',
  13. 'content-type: application/x-www-form-urlencoded; charset=UTF-8', 'x-requested-with: XMLHttpRequest');
  14. curl_setopt( $ch, CURLOPT_URL, $urlTo);
  15. curl_setopt( $ch, CURLOPT_COOKIEJAR, dirname(__FILE__ ). '/cookie.txt' );
  16. curl_setopt( $ch, CURLOPT_COOKIEFILE, dirname(__FILE__ ). '/cookie.txt' );
  17.  
  18. curl_setopt( $ch, CURLOPT_POST, true);
  19. curl_setopt( $ch, CURLOPT_POSTFIELDS, $post);
  20. curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1);
  21.  
  22. $result = curl_exec($ch);
  23. curl_close ($ch);
  24. echo $result;
  25. if($result=="") {
  26. echo "ОШИБКА!"; }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement