Advertisement
Guest User

Untitled

a guest
Dec 17th, 2016
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. //username and password of account
  2. $username = trim($result['AtomyID']);
  3. $password = trim($password);
  4. //echo $username.'<br>';
  5. //echo $password.'<br>';
  6.  
  7. $url="https://www.atomy.com:449/".$result['Country']."/Home/Account/Login";
  8. $agent = 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0';
  9. $header=array(
  10. 'Host: www.atomy.com:449',
  11. 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0',
  12. 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  13. 'Accept-Language: en-us,en;q=0.5',
  14. 'Accept-Encoding: gzip,deflate,br',
  15. 'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7',
  16. 'Keep-Alive: 300',
  17. 'Connection: keep-alive',
  18. 'DNT: 1',
  19. 'Upgrade-Insecure-Requests: 1',
  20. 'Cache-Control: max-age=0',
  21. );
  22.  
  23. $ch = curl_init();
  24. curl_setopt($ch, CURLOPT_PORT, '449');
  25. curl_setopt($ch, CURLOPT_URL, $url);
  26. curl_setopt($ch, CURLOPT_USERAGENT, $agent);
  27. curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
  28. curl_setopt($ch, CURLOPT_HEADER, 0); // don't return headers
  29. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  30. curl_setopt($ch, CURLOPT_REFERER, 'http://google.com');
  31. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
  32. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  33. $result = curl_exec($ch);
  34.  
  35. echo $result;
  36.  
  37. echo 'error no: '.curl_errno($ch) . '<br/>';
  38. echo 'error: '.curl_error($ch) . '<br/>';
  39. curl_close ($ch);
  40. die();
  41. exit();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement