My Sample code:
$conn = new XMPP($XMPP_HOST, $XMPP_PORT, $XMPP_USER, $XMPP_PASSWORD, $XMPP_RESOURCE , $XMPP_HOST,$printlog = true, $loglevel=XMPPLOG::LEVEL_ERROR);
$conn->useEncryption(false);
$conn->connect();
$conn->processUntil(‘session_start’);
$conn->presence();
$conn->message(‘ob_test’.’@’.$XMPP_DOMAIN, “test”, ‘chat’);
//$payloads = $conn->processUntil(‘message’);
$conn->disconnect();
When i run this code then i get the below error.
#0 C:\wamp64\www\woc\api\app\Libraries\XMPPHP\XMLStream.php(655): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8, ‘Array to string…’, ‘C:\wamp64\www\w…’, 655, Array)
#1 [internal function]: App\Libraries\XMPPHP\XMLStream->endXML(Resource id #245, ‘STREAM:FEATURES’)
#2 C:\wamp64\www\woc\api\app\Libraries\XMPPHP\XMLStream.php(477): xml_parse(Resource id #245, ‘<stream:feature…’, false)
#3 C:\wamp64\www\woc\api\app\Libraries\XMPPHP\XMLStream.php(553): App\Libraries\XMPPHP\XMLStream->_’…
If i comment the red color line of “session_start” then it is working but not receiving the message.
Please help me if anyone has idea.
Using : Laravel 5.3,
XMPPHP: GitHub - BirknerAlex/XMPPHP: Original fork from svn://netflint.net/xmpphp
Openfire: 4.0.4