Advertisement
Guest User

Untitled

a guest
Dec 5th, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. $login_url = "http://www.3dcontentcentral.com/default.aspx";
  2. $post_data = '3dcclogin=zaurpost@yandex.ru&3dccpassword=123456';
  3. $ch = curl_init();
  4. curl_setopt($ch, CURLOPT_USERAGENT , 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1.4) Gecko/20091016 Firefox/3.5.4');
  5. curl_setopt($ch, CURLOPT_URL, $login_url );
  6. curl_setopt($ch, CURLOPT_FAILONERROR, 1);
  7. curl_setopt($ch, CURLOPT_POST, 1 );
  8. curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
  9. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  10. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  11. curl_setopt($ch, CURLOPT_COOKIEJAR, $_SERVER['DOCUMENT_ROOT'].'/cookie.txt');
  12. curl_setopt($ch, CURLOPT_COOKIEFILE, $_SERVER['DOCUMENT_ROOT'].'/cookie.txt');
  13.  
  14. $postResult = curl_exec($ch);
  15. echo $postResult;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement