0

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('anas@192.168.1.204', 'Hai anas!');
$conn->disconnect();

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

1 Answers1

1

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

Mickaël Rémond
  • 9,035
  • 1
  • 24
  • 44