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 = '[email protected]';
$client->addUser($user);
// Ban Account
$user = '[email protected]';
$reason = 'Acting too smart';
$client->banAccount($user, $reason);