Here is example how simple and fast your PHP program may contact to ejabberd server for authentication (example with exception support) :
<?
include("class.ejabberd_xmlrpc.php");
$ejabberd_rpc = new rpc_connector("192.168.0.1","4666","jabster.pl","test","123456");
try {
if($ejabberd_rpc->auth() === true) {
define(AUTHENTICATED,true);
}
else{
define(AUTHENTICATED,false);
}
}
catch (Exception $e) {
echo "Exception: ".$e->getMessage();
echo ", Code: ".$e->getCode();
define(AUTHENTICATED,false);
}
var_dump(AUTHENTICATED);
?>
see source for detailed usage and available methods. This class will evolve so watch the commits on proccess-one.
