I want to create a XMPP client with php, I tried this code
<?php
include("xmpphp/XMPPHP/xmpp.php");
$conn = new XMPP('192.168.1.62', 5222, 'client', 'pass', 'xmpphp', 'cnx-pc', $printlog=False, $loglevel=LOGGING_INFO);
$conn->use_encryption = False;
$conn->connect();
$conn->processUntil('session_start');
$conn->message('cnx', 'hi');
$conn->disconnect();
?>
but i have this fatal error Fatal error: Class 'XMPP' not found in D:\EasyPHP-5.3.3.1\www\xmpp1.php on line 3
Any one have an idea about the problem
The class name is
XMPPHP, notXMPP. Use that, and the error will go away.Also replace
includewithrequiresince you rely on the class to exist.