This yocLibrary enables your project to send and receive with EPP (Extensible Provisioning Protocol) in PHP.
composer require yocto/yoclib-epp
use YOCLIB\EPP\EPPDocumentHelper;
use YOCLIB\EPP\EPPRegistries;
use YOCLIB\EPP\EPPRegistry;
use YOCLIB\EPP\Connections\TCPEPPConnection;
use YOCLIB\EPP\Elements\EPPEppElement;
$registry = new EPPRegistry(EPPRegistries::SIDN_OTE_HOSTNAME);
$conn = new TCPEPPConnection($registry);
$doc = $conn->readDocument();
/**@var EPPEppElement $epp*/
$epp = $doc->documentElement;
$hello = $epp->getHello();use YOCLIB\EPP\EPPDocumentHelper;
use YOCLIB\EPP\EPPNamespaces;
use YOCLIB\EPP\EPPRegistries;
use YOCLIB\EPP\EPPRegistry;
use YOCLIB\EPP\Connections\TCPEPPConnection;
$doc = EPPDocumentHelper::createEPPDocument();
$epp = $doc->createElementNS(EPPNamespaces::EPP_1_0,'epp');
$hello = $doc->createElementNS(EPPNamespaces::EPP_1_0,'hello');
$epp->appendChild($hello);
$doc->appendChild($epp);
$registry = new EPPRegistry(EPPRegistries::SIDN_OTE_HOSTNAME);
$conn = new TCPEPPConnection($registry);
$xml = $conn->writeDocument($doc);