xmpp-prebind-php
xmpp-prebind-php copied to clipboard
Doesn't save sid
If I understand the protocol correctly, $sid should be somehow persisted so it doesn't create a new sid for the same user every time you call the binding.php file.
Well, I followed your example (adding $username and $password variables and an echo at the end)
require_once "lib/XmppPrebind.php";
$username = "test";
$password = "test";
$xmppPrebind = new XmppPrebind('localhost', 'http://localhost:5280/http-bind/', null, false, true);
$xmppPrebind->connect($username, $password);
$xmppPrebind->auth();
$sessionInfo = $xmppPrebind->getSessionInfo(); // array containing sid, rid and jid
echo json_encode($sessionInfo);
and every time I run it, it gives me a different sid. Where is it supposed to save it? And, if it doesn't, (i could save it myself) how do I inject it back in the next run?