Eshin Jozer
Eshin Jozer

Reputation: 1

How to create XMPP(ejabberd) users using XMPPHP client

I have created the connection and sent messages using following code,

include("XMPPHP/XMPP.php");
$conn = new XMPPHP_XMPP(
    '192.168.1.204',
    5222,
    'eshin(username)',
    'eshin(password)',
    'xmpphp',
    '192.168.1.204'
);

//$conn->use_encryption = false; // Optional
$conn->connect();
$conn->processUntil('session_start');
$conn->message('[email protected]', 'Hai anas!');
$conn->disconnect();

Now I need to create XMPP users via xmpphp client... Kindly help me ..

Upvotes: 0

Views: 712

Answers (1)

Mickaël Rémond
Mickaël Rémond

Reputation: 9055

You should use ejabberdctl register command to create a user. You can also use the same register command exposed through ReST API: https://docs.ejabberd.im/admin/api/#register---register-a-user

Upvotes: 1

Related Questions