PHP Ejabberd Client to communicate with XMPP Client
composer require cloudadic/php-ejabberd
<?php
require __DIR__ . '/vendor/autoload.php';
use Ejabberd\Client;
$client = Client([
'port' => 5285,
'host' => '192.178.12.1',
'apiEndPoint' => 'your_endpoint'
]);
// Add User
$user = 'john@doe.com';
$client->addUser($user);
// Ban Account
$user = 'john@doe.com';
$reason = 'Acting too smart';
$client->banAccount($user, $reason);