Quote:
Originally Posted by craigbrass Correct. It is customer end only. |
Yes got that ok, but what I want is when logging in at eSupport as user/customer login not only is looked up by LoginShare in xcart in this case, but a login at that location also takes place or the other way around. The 2 locations still being individually sites support.domain.com and shop.domain.com but login onto one will also have you logged in at the other.
I figure this could possibly be done with cURL and I figured it should be possible when logging in at xcart, it should also post the login data to eSupport. I have tried it a bit and get as far as the login is authenticated at eSupport, but still I cannot get it into the session created which still say 'isloggedin=0' although 'loginresult=1' in client_loginhandler.php - must be missing something in my post fields. This is what I send now:
Code:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://support.astrocalc.com/index.php");
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.4)");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,
"loginemail=$login&loginpassword=$password&_m=core&_a=login");
curl_exec ($ch);
curl_close ($ch);
Also I get the server IP in the session, wich I need to get around somehow but haven't got to that yet. Any ideas?