fornit wrote:Well,
the bridge can only work if it gets the cookies from phpBB3. As far as I know this makes it necessary that both are located on the same domain. It is possible to use subdomains but from my understanding it cannot work if you use completely different domains.
But I'm not a cookie specialist. If you find a solution please let me know.
Regards
fornit
My solution :
master -> phpbb domain
slave -> coppermine domain
slave site :
add a file named something as cookie_bridging.php as follows :
<?php
$sid = $_GET['sid'];
if ($sid != '')
{
setcookie('<master_cookie_name>_sid',$sid,time()+7200);
}
else
{
setcookie('<master_cookie_name>_sid','',time()-3600);
}
?>
master site :
edit the styles/<stylename>/template/overall_header.html file as follows :
add wherever you like (i did it at the end of links main bar) the following line :
<img src="http://<slave_domain>/cookie_bridging.php?sid={SESSION_ID}" widht=1 height=1>
Ok, that's all, it sets or unsets corresponding cookie on the slave site whenever i load any master site page.
It works fine for my sites, but it can be refined with parameters, a couple of lines more and it will handle "sid changes" too... what about it? Any security leak?