Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- $username="email@gmail.com";
- $password="passemail";
- $url="http://www.goodreads.com";
- $cookie="cookie.txt";
- $user_agent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6";
- $postdata = "user_email=". $username ."&user_password=". $password;
- $ch = curl_init();
- curl_setopt ($ch, CURLOPT_URL, $url . "/user/sign_in");
- curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
- curl_setopt ($ch, CURLOPT_USERAGENT, $user_agent);
- curl_setopt ($ch, CURLOPT_TIMEOUT, 4564524245260);
- curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt ($ch, CURLOPT_COOKIEJAR, $cookie);
- //curl_setopt($ch,CURLOPT_COOKIEFILE, $cookie);
- curl_setopt ($ch, CURLOPT_REFERER, 'http://google.com');
- curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
- curl_setopt ($ch, CURLOPT_POSTFIELDS, $postdata);
- curl_setopt ($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_HEADER, true);
- $result = curl_exec ($ch);
- curl_close($ch);
- echo $result;
- $ch = curl_init('https://www.goodreads.com/shelf/show/contemporary?page=7');
- //curl_setopt ($ch, CURLOPT_COOKIEJAR, $cookie);
- curl_setopt ($ch, CURLOPT_USERAGENT, $user_agent);
- curl_setopt ($ch, CURLOPT_COOKIEFILE, $cookie);
- curl_setopt ($ch, CURLOPT_COOKIESESSION, 1);
- curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_HEADER, true);
- $res = curl_exec ($ch);
- curl_close($ch);
- echo $res;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement