Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 543 Bytes

File metadata and controls

38 lines (27 loc) · 543 Bytes

PHP Client for Ejabberd

PHP Ejabberd Client to communicate with XMPP Client

Installation

composer require cloudadic/php-ejabberd

Usage

<?php

require __DIR__ . '/vendor/autoload.php';

use Ejabberd\Client;

$client = Client([
  'port' => 5285,
  'host' => '192.178.12.1',
  'apiEndPoint' => 'your_endpoint'
]);

Examples

// Add User
$user = '[email protected]';
$client->addUser($user);

// Ban Account
$user = '[email protected]';
$reason = 'Acting too smart';
$client->banAccount($user, $reason);