Hi guys, I hope this is the right place to post this.
I have two subdomains, one has authentication login already setup, so I just want to use the "single sign on" method using curl to achieve this.
below is my script. I have tested it and it does pass variables to the authentication page but I can not be logged in,
I am hoping you guys can help.
$passed_vars='l_username='.$_REQUEST["l_username"].'&l_password='.$_REQUEST["l_password"].'&returnURL='.$_REQUEST["returnURL"];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://example.com/play/login');
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $passed_vars);
curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt ($ch,CURLOPT_COOKIEFILE, 'cookie.txt');
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$store = curl_exec ($ch);
curl_close($ch);
when I do print_r($store) I can see the login page returned but no sessions set.
Thanks