cloudadic/php-ejabberd

There is no license information available for the latest version (1.0.4) of this package.

Ejabberd Client Library for chat apps

1.0.4 2017-06-30 09:28 UTC

This package is not auto-updated.

Last update: 2024-11-04 07:08:28 UTC


README

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 = 'john@doe.com';
$client->addUser($user);

// Ban Account
$user = 'john@doe.com';
$reason = 'Acting too smart';
$client->banAccount($user, $reason);