yoandrey Posted February 11, 2015 Share Posted February 11, 2015 Well I'm pretty new to php and curl so as always best way to learn it is by coding it ,so I started to code a script to remote login into amazon ,but I can even manage to load up the site . Any help ? Here is my code . <?php $url='https://source.amazon.com/forcelogin?returnToURL=https://www.amazon.com'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7"); curl_setopt($ch, CURLOPT_COOKIEFILE,'cookies.txt'); curl_setopt($ch, CURLOPT_COOKIEJAR, "cookies.txt"); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0 ); $data = curl_exec($ch); var_dump(curl_getinfo($ch)); echo curl_error($ch); curl_close($ch); ?> I can understand why is not working. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.