Skip to content

A High Level EPP TCP/SSL Client for PHP

License

Notifications You must be signed in to change notification settings

AfriCC/php-epp2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

php-epp2

php-epp2 is a EPP high-level TCP client written in modern PHP.

It started as a "fork" of centralnic/php-epp.

Released under the GPLv3 License, feel free to contribute!

Table of Contents generated with DocToc

Requirements

  • PHP 5.4+
  • libicu 4.8.x
  • php-intl 3.x

Features

  • modern PHP standards
    • autoloader
    • PSR-1 and PSR-2 compliant
    • notice and warning free
  • high-level usage
  • simplified client
  • SSL (+local-cert)
  • XML based responses for direct traversal via xpath

Usage

Basic Client Connection

this will automatically login on connect() and logout on close()

<?php
require 'src/AfriCC/EPP/Autoload.php';

use AfriCC\EPP\Client as EPPClient;

$epp_client = new EPPClient(array(
    'host' => 'epptest.org',
    'username' => 'foo',
    'password' => 'bar',
    'services' => array(
        'urn:ietf:params:xml:ns:domain-1.0',
        'urn:ietf:params:xml:ns:contact-1.0'
    ),
    'debug' => true,
));

try {
    $greeting = $epp_client->connect();
} catch(Exception $e) {
    echo $e->getMessage() . PHP_EOL;
    unset($epp_client);
    exit(1);
}

$epp_client->close();

Future

  • stricter response parsing
  • make it server capable (in conjunction with mod_epp)

Credits

Acknowledgments

  • Gavin Brown (original author of Net_EPP)

License

php-epp2 is released under the GPLv3 License. See the bundled LICENSE file for details.