waynew Posted October 29, 2008 Share Posted October 29, 2008 Basically, the purpose of the below code is to login to my account and update one of the features on my profile using cURL. The problem however seems to be the case that the site thinks that I don't have cookies enabled. Please note that I'm using a Windows server. <?php // INIT CURL $ch = curl_init(); // SET URL FOR THE POST FORM LOGIN curl_setopt($ch, CURLOPT_URL, 'http://www.bebo.com/SignIn.jsp'); curl_setopt ($ch, CURLOPT_POST, 1); curl_setopt ($ch, CURLOPT_POSTFIELDS, 'EmailUsername=*****&Password=*******&signin=Sign In'); curl_setopt ($ch, CURLOPT_COOKIEJAR, 'temp/bebocookie.txt'); ob_start(); $store = curl_exec ($ch); ob_end_clean(); curl_close ($ch); unset($ch); $ch = curl_init(); curl_setopt($ch, CURLOPT_COOKIEFILE, "temp/bebocookie.txt"); curl_setopt($ch, CURLOPT_URL,"http://www.bebo.com/Saying.jsp?From=Profile&MemberId=4153429001"); curl_setopt ($ch, CURLOPT_POST, 1); curl_setopt ($ch, CURLOPT_POSTFIELDS, 'sayingText=Testing&Save=Update'); $result = curl_exec ($ch); curl_close ($ch); ?> Link to comment https://forums.phpfreaks.com/topic/130507-curl-login-and-member-action/ Share on other sites More sharing options...
GKWelding Posted October 29, 2008 Share Posted October 29, 2008 This is because you're setting COOKIEJAR as a file with .txt extension, COOKIEJAR should be a folder only, not a file. Link to comment https://forums.phpfreaks.com/topic/130507-curl-login-and-member-action/#findComment-677384 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.