Php EPP调用在xml post上返回空值
我正在尝试连接epp并提交xml,但它只返回“服务器已连接”以外的任何内容Php EPP调用在xml post上返回空值,php,xml,sockets,epp,Php,Xml,Sockets,Epp,我正在尝试连接epp并提交xml,但它只返回“服务器已连接”以外的任何内容 $xml = '<?xml version="1.0" encoding="UTF-8" standalone="no"?> <epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:ietf:params:xml:ns
$xml = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd">
<hello />
</epp>';
$output = '';
$fp = fsockopen("epp.host.com", 44, $errno, $errstr);
if(!$fp) {
echo "ERROR: $errno - $errstr<br />\n";
}
else{
echo "epp connected\r\n";
fwrite($fp, $xml."\r\n");
while(!feof($fp)){
$output .= fgets($fp, 128);
}
fclose($fp);
}
$result = strtok($output, "\n");
echo $result;
$xml='1!'
';
$output='';
$fp=fsockopen(“epp.host.com”,44$errno$errstr);
如果(!$fp){
echo“错误:$errno-$errstr
\n”;
}
否则{
回显“epp已连接\r\n”;
fwrite($fp,$xml.\r\n”);
而(!feof($fp)){
$output.=fgets($fp,128);
}
fclose($fp);
}
$result=strtok($output,“\n”);
回声$结果;
你能建议我在这段代码中缺少什么来解决这个问题吗。谢谢你没有提供足够的信息。EPP不是这样工作的,您至少缺少两点:
问候语节点;作为客户,您应该阅读它(它包含有用的信息),然后回复
@它应该返回xml响应,
echo$output甚至不返回任何内容代码>