I want to send message using XMPP and I have used this code:
include 'XMPP.php';
#Use XMPPHP_Log::LEVEL_VERBOSE to get more logging for error reports
#If this doesn't work, are you running 64-bit PHP with < 5.2.6?
$conn = new XMPPHP_XMPP('hostname',5222, 'panelusername', 'panelpassword', 'xmpphp', 'gmail.com', $printlog=false, $loglevel=XMPPHP_Log::LEVEL_INFO);
try {
$conn->connect();
$conn->processUntil('session_start');
$conn->presence();
$conn->message('senderusername', 'This is a test message!');
$conn->disconnect();
} catch(XMPPHP_Exception $e) {
die($e->getMessage());
}
But it gives me this error:
Warning: require_once(XMPPHP/XMLStream.php): failed to open stream: No such file or directory in /opt/lampp/htdocs/xmppmessage/examples/XMPP.php on line 30
Fatal error: require_once(): Failed opening required 'XMPPHP/XMLStream.php' (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/xmppmessage/examples/XMPP.php on line 30