I have seen it posted in the forums before, but I have another piece of software I am trying to call EE for a login. The basic problem is that the other software (Social Engine 4) is the main element of the site, is quite well established and the client has tagged on an e-commerce shop at the end of a year of use. Simple answer, they don’t want ot change the site as it is, but they want the users of the SE4 to be able to login and trigger the EE shop I have running.
So what I did is this:
http://mydomain.com/folder/test/[email protected]This works, if I change the username, it logs me in as the other person, verified by the username listed on the page, which changes per login. I have checked and it records the logins through the members panel as well. So all good so far.
My code for my EE test template is:
<html>
<head>
</head>
<body>
<?php print_r($_POST); ?>
Email: {post:email}
Login: {segment_2}
{!-- {exp:logmein:now email="{post:email}" expire="3600"} --}
{exp:logmein:now email="{segment_2}" expire="3600"}
{username}
{if segment_3 == 'logout'}
{exp:logmein:logout}
{/if}
</body>
</html>Now I had php turned on to test this and I loaded my SE4 login. I also have global variables moule in to capture a post variable from curl. This is what I get for a return:
Array ( [email] => [email protected] [SUBMIT] => Send )
Email: [email protected]
Login: [email protected]
adminNow the curl code I have in my other page is:
// call EE pages
$ch = curl_init();
$curlPost = 'email=' . urlencode($email) . '&SUBMIT=Send';
curl_setopt($ch, CURLOPT_URL, 'http://my.server.com/folder/index.php/test/'.$email);
// Execute
curl_setopt($ch, CURLOPT_POST, 0);
curl_setopt($ch, CURLOPT_POSTFIELDS, $curlPost);
curl_exec($ch);
die;So anyone familiar with either the curl function and/or ee login sessions? I can’t figure out why the login is not being called, since everything is parsing out correctly. It’s like the EE install never sees the login being sent.
I have hammered it out this far, but baffled now at this point. I am sure it is something easy, so any help would be great.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.