【发布时间】:2017-06-09 19:32:09
【问题描述】:
我正在尝试制作一个基本脚本,以将标准问候语发送到我的托管公司的 EPP 服务。
我已经阅读了许多文章 - Connecting to domain registry EPP server Connect to EPP Server with PHP, using SSL?
很遗憾,他们没有帮助我,因为我的理解有限。
我的托管公司在http://api.heartinternet.co.uk/api2.html 提供了一些有关访问该服务的信息。
他们还提供了一个包含文件,我暂时保存在 thisismatt.co.uk/api.inc
我现在只是尝试使用以下命令让 Hello 命令工作 -
<?php
require_once('api.inc');
$hi_api = new HeartInternet_API();
$hi_api->connect(false); // true = connect to the test API, false = connect to the live API.
$username = "87bd83a452af36ba";
$password = "Q9oSjZchY8";
$hi_api->logIn($username, $password, $objects, $extensions);
$some_xml = <<<XML
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<hello />
</epp>
XML;
$returned_xml = $hi_api->sendMessage($some_xml, true);
echo "XML Sent: <br />" . htmlentities($some_xml) . "<br />";
echo "XML Received: <br /> " . htmlentities($returned_xml) . "<br />";
?>
我不断收到 500 服务器错误。出了什么问题?
【问题讨论】:
-
每个人都说他们是菜鸟。过一段时间就老了。最好直接提出问题,让人们帮助您找到答案。一段时间后,所有的客套话和风度翩翩的解释都变得令人讨厌,使问题变得混乱,当人们在审查队列中对新问题进行分类时需要更多时间阅读(参见顶部的链接)。建议编辑问题并删除“我是菜鸟”部分。否则,看起来不错。