caprichos.xxx Posted March 11, 2012 Share Posted March 11, 2012 Hi, I need to login to 1.4.7 BO using cURL and I can't. Here is the code I use: ------------------------------------------------------------------------------------------- $login_url = 'http://my_shops_URL/administration_folder/login.php'; $post_fields = array(); $post_fields="the_email_i_use"; $post_fields[passwd]="My_password"; $ch = curl_init($login_url); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_MAXREDIRS, 10); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields ); curl_setopt($ch, CURLOPT_COOKIESESSION, 1); curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie.txt"); curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.txt"); curl_exec($ch); curl_close($ch); ------------------------------------------------------------------------------------------- Any idea? thank'u. Raül Tufet. 1 Link to comment Share on other sites More sharing options...
Recommended Posts