这是我连接ejabberd服务器的代码
<?php
$xml=simplexml_load_file("http://static.cricinfo.com/rss/livescores.xml");
foreach($xml->getElementsByTagName('item') as $match)
{
echo $match->getAttribute('title'), "\n";
}
?>
我收到此错误:
XMPPTCPConnectionConfiguration.Builder builder = XMPPTCPConnectionConfiguration.builder();
builder.setUsernameAndPassword("admin@manish-lenovo-g510", "admin");
builder.setServiceName("manish-lenovo-g510");
builder.setHost("192.168.1.2");
builder.setPort(5280);
XMPPTCPConnectionConfiguration build = builder.build();
AbstractXMPPConnection conn1 = new XMPPTCPConnection(build);
conn1.connect();
如果我打开ejabberd的管理界面,那么为什么这段代码无效。还有一件事如何找到服务名称,因为我猜这可能是问题,因为我不知道服务名称,我随机给了它。