Create ejabberd user from PHP

后端 未结 7 1671
说谎
说谎 2020-12-08 17:37

I need to create an ejabberd user from a PHP script. I also need to be able to add the new user to a predefined shared roster.

Should I just call ejabberdctl<

7条回答
  •  醉酒成梦
    2020-12-08 18:02

    If you want a clean and secure way of doing this using PHP within XMPP protocol, I will recommend working with this example script register_user.php. This is an example that can be found inside Jaxl PHP Library.

    Download Jaxl library and use as follows:

    JAXL $ php examples/register_user.php localhost
    Choose a username and password to register with this server
    username:test_user
    password:test_pass
    registration successful
    shutting down...
    JAXL $
    

提交回复
热议问题