beermaster Posted November 22, 2012 Share Posted November 22, 2012 Hi everyone, I am using prestahop v.1.5.2 and last few days I am trying to make a curl login into backend (later must create a login to frontend) but with no success. I have a custom site with user login area and prestashop in subfolder of my site. I want to "merge" the users and create а script which must set the cookies for prestashop (I have already created the existing users in mysite on prestashop). I have created a script but doesn`t work, there is no cookie set from prestashop for the user. Where is the problem, is there any other solution of my idea. This is my script: <?php $login_url = 'path_to_site/shop/admin_test/login.php'; $email="user_mail"; $passwd="user_pass"; //$post_fields = 'passwd='.urlencode($passwd).'&email='.urlencode($email); $datatopost = array( 'password' => $passwd, 'email' => $email ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $login_url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields); curl_setopt($ch, CURLOPT_RETURNTRANSFER ,1); curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_HEADER, 1); $info = curl_getinfo($ch); $returndata = curl_exec ($ch); curl_close($ch); ?> Link to comment Share on other sites More sharing options...
aualtopoll Posted August 26, 2013 Share Posted August 26, 2013 Any luck with that? Link to comment Share on other sites More sharing options...
Recommended Posts