Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $login_url = "http://www.3dcontentcentral.com/default.aspx";
- $post_data = '3dcclogin=zaurpost@yandex.ru&3dccpassword=123456';
- $ch = curl_init();
- 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');
- curl_setopt($ch, CURLOPT_URL, $login_url );
- curl_setopt($ch, CURLOPT_FAILONERROR, 1);
- curl_setopt($ch, CURLOPT_POST, 1 );
- curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt($ch, CURLOPT_COOKIEJAR, $_SERVER['DOCUMENT_ROOT'].'/cookie.txt');
- curl_setopt($ch, CURLOPT_COOKIEFILE, $_SERVER['DOCUMENT_ROOT'].'/cookie.txt');
- $postResult = curl_exec($ch);
- echo $postResult;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement