Send an XML EPP request via TCP in PHP -
i'm using code connect registrar via tcp.
stream_socket_client('tcp://registrarwebsite:700', $errno, $errstr, 10, stream_client_connect, $fc)
connection successful, $fc, using stream_context_create
pass ssl certificate , key. @ point, works fine.
$fc = stream_context_create(array( 'ssl' => array('allow_self_signed' => true, 'local_cert' => 'ma_registrar_cert.pem', 'local_pk' => 'ma_registrar_key.pem' )));
i want add xml request stream_context_create
, send xml epp requests distant server.
how that?
edit
this example of xml request want send server along stream context.
<?xml version="1.0" encoding="utf-8" standalone="no" ?> <epp xmlns="urn:ietf:params:xml:ns:epp-1.0"> <command> <create> <domain:create xmlns:domain="urn:ietf:params:xml:ns:domain-1.0"> <domain:name>testdomain.com</domain:name> <domain:period unit="y">testdomain.com</domain:period> <domain:registrant>john doe</domain:registrant> </domain:create> </create> <cltrid>reference</cltrid> </command> </epp>
Comments
Post a Comment