View Single Post

  #2 (permalink)  
Old 04-10-2008
Paul van Brouwershaven
 
Posts: n/a
Default Re: Connecting to an epp server

don't forget to send the 4 bytes!

Alan Willsher schreef:
> Hi im trying to connect to Nominets EPP server
>
> Details can be found here http://www.nominet.org.uk/registrars/systems/epp/
>
> Im trying to send a login request the example can be found here
> http://www.nominet.org.uk/registrars/systems/epp/login/
>
> My script seems to connect ok, but im recieving no response when I try to
> send the login xml details.
>
>
> <?
> $fp = @fsockopen('ssl://testbed-epp.nominet.org.uk', 700, $errno, $errstr,
> 100);
> echo "(".$errno." ".$errstr.")";
> if(!$fp) {
> echo "Not Connected!";
> }
>
> else {
> echo "Connected!\r\n";
>
> $xml = '<?xml version="1.0" encoding="UTF-8"?>
> <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">
> <command>
> <login>
> <clID>EXAMPLE-TAG</clID>
> <pw>foo-BAR2</pw>
> <options>
> <version>1.0</version>
> <lang>en</lang>
> </options>
> <svcs>
> <objURI>http://www.nominet.org.uk/epp/xml/nom-account-1.0
> </objURI>
> <objURI>http://www.nominet.org.uk/epp/xml/nom-domain-1.0</objURI>
> <objURI>http://www.nominet.org.uk/epp/xml/nom-contact-1.0
> </objURI>
> <objURI>http://www.nominet.org.uk/epp/xml/nom-ns-1.0</objURI>
> </svcs>
> </login>
> <clTRID>ABC-12345</clTRID>
> </command>
> </epp>';
>
> fputs($fp, $xml, strlen($xml));
>
> while (!feof($fp)) {
> $response .= fgets($fp, 128);
> }
> echo $response;
>
> fclose($fp);
>
> }
> ?>
>

Reply With Quote