【发布时间】:2015-03-18 21:03:45
【问题描述】:
我正在尝试连接 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: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;
您能否建议我在此代码中缺少什么来解决此问题。谢谢
【问题讨论】:
-
@PaulCrovella 它应该返回 xml 响应。它甚至没有返回
echo $output;