I need to implement Comet Chat, a facebook-chat-like third-party script, into my Craft project.
Comet Chat can connect to most CMS and PHP framework but there is no Craft integration yet, so I tried to use the "custom coded site" procedure.
http://www.cometchat.com/documentation/installing-cometchat/custom-coded-site/php-site/
Comet Chat need to access a session variable to authenticate user. Ex: $_SESSION['userid'].
The problem: Craft write its session variables with some nice sorcelery that makes outside script unable to read it.
So, the Comet Chat is not able to read the userid, even if I made a Craft plugin who writes UserID in $_SESSION['userid'].
I also tried, by the Craft cookie ($_COOKIE values are bidirectionally accessible unlike $_SESSION values, of course) to find some relation or mechanism to tells Comet Chat who's the current user in Craft, unsuccessfuly.
Perhaps some other PHP scripts or cases may need to read the Craft session, so I'm pretty sure this question can be relevant for more than Comet Chat integration.
Any ideas?
Thanks in advance!