【发布时间】:2015-04-01 21:33:53
【问题描述】:
我正在使用 codeigniter,我想向 openfire 发送一个添加请求,但我真的不明白我必须做什么。我是初学者,我阅读了本指南 User Service 并尝试使用 curl Curl lib 添加新用户,但我被卡住了。 Openfire 配置正确,因为如果我从浏览器发出请求,则添加有效 这是我的代码
$this->load->library('curl');
$username='usertest';
$password='password';
$header='Authorization';
$content='mykey';
$this->curl->create('http://myserver.net', 9090);
$this->curl->http_header($header, $content);
$this->curl->http_header('Content-Type', 'application/xml');
$this->curl->post(array('username'=>$username,'password'=>$password));
$this->curl->execute();
但是没有添加用户
对不起,我的英语不好
【问题讨论】:
-
谢谢,在本指南的帮助下没有更多错误,但是没有添加用户,我认为是autentication或post参数有问题
标签: php codeigniter curl openfire