从PHP创建ejabberd用户 [英] Create ejabberd user from PHP
本文介绍了从PHP创建ejabberd用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要从PHP脚本创建一个ejabberd用户.我还需要能够将新用户添加到预定义的共享名册中.
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.
我应该只使用exec()
呼叫ejabberdctl
还是有更好的方法?
Should I just call ejabberdctl
using exec()
or is there a better way?
推荐答案
ejabberdctl最简单.其他选项是:
ejabberdctl is by far the easiest in this specific case. The other options are:
-
在PHP中实现完整的客户端XMPP(!)
Implement a full client XMPP in PHP (!)
在Erlang中实现一个用于代理请求的模块:PHP<-> Erlang通信将需要通过套接字进行,并且会涉及大量封送处理(!)
Implement a module in Erlang that proxies the requests: the PHP<-->Erlang communication would need to be through a socket and lots of marshaling would be involved (!)
这篇关于从PHP创建ejabberd用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文