-1

I'm trying to get a basic script working to send the standard greeting to my hosting company's EPP service.

I've read a number of articles already - Connecting to domain registry EPP server Connect to EPP Server with PHP, using SSL?

Unfortunately they don't help me, as my understanding is limited.

My hosting company provide some information on accessing the service at http://api.heartinternet.co.uk/api2.html.

They also provide an includes file which I have temporarily saved at thisismatt.co.uk/api.inc

I'm now simply trying to get the Hello command to work using the following -

<?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 />";

?>

I keep getting 500 server error. What's gone wrong?

Community
  • 1
  • 1
  • Everyone says they are a noob. Gets old after awhile. Better to just get straight to the question and let people help you find the answer. All the pleasantries and personable explanations become a nuisance after awhile, clutter the question and take more time to read when people are triaging new questions in the review queue (see. link at top). Recommend editing the question and removing the "I'm a noob" part. Otherwise, looks good. – clearlight Jan 25 '17 at 00:17

1 Answers1

0

Various points :

  • thisismatt.co.uk/api.inc gives a 404
  • I suppose HeartInternet_API is defined in it, but in any case you should test the result of each call, that is after new, connect and logIn (double check the case)
  • you should investigate what this 500 error is, you probably have more information in your logfiles
  • i hope you did not give true username & password here :-(
  • in your XML exchange, try to have on first line <?xml version="1.0"?> the parser may expect that there
Patrick Mevzek
  • 10,995
  • 16
  • 38
  • 54