I've had a look back through the forum posts and it appears there are a few people that have asked similar questions... The closest I found was this:
http://www.contao-community.org/view...t=login#p11169
Basically, non-contao system of some form where users log in and I want to be able to log those users into Contao automatically, once they've logged into the other system (or at some point whilst they are on it) so that when the click the link to the protected contao page, they are not prompted to log in again. The sites will appear as 1 site to the end user.
I came accross this:
Code:
function do_post_request($url, $data, $optional_headers = null)
{
$params = array('http' => array(
'method' => 'POST',
'content' => $data
));
if ($optional_headers !== null) {
$params['http']['header'] = $optional_headers;
}
$ctx = stream_context_create($params);
$fp = @fopen($url, 'rb', false, $ctx);
if (!$fp) {
throw new Exception("Problem with $url, $php_errormsg");
}
$response = @stream_get_contents($fp);
if ($response === false) {
throw new Exception("Problem reading data from $url, $php_errormsg");
}
return $response;
}
at :
http://wezfurlong.org/blog/2006/nov/...-without-curl/
But I cannot get this to work - I get issues with the request token (it is set in the form that gets opened, if I output the response) but no login happens and if I then use that outputted form, I get a token verification error.
Does anyone have any ideas?
Bookmarks