EPP (Extensible Provisioning Protocol) Client Library for Laravel

2.0.0 2025-01-20 22:51 UTC

This package is auto-updated.

Last update: 2025-08-21 00:02:17 UTC


README

This is a PSR-compliant EPP (Extensible Provisioning Protocol) client library for Laravel applications.

Requirements

  • PHP 8.2 or higher
  • Laravel 10.x or 11.x
  • ext-xml PHP extension

Installation

composer require dream-hun/epp

The package will automatically register its service provider and facade.

Configuration

Publish the configuration file:

php artisan vendor:publish --tag=epp-config

This will create a config/epp.php file in your application. Update your .env file with your EPP server credentials:

EPP_HOST=epp.example.com
EPP_PORT=700
EPP_USERNAME=your-username
EPP_PASSWORD=your-password
EPP_SSL=true

# SSL Configuration (optional)
EPP_SSL_VERIFY_PEER=true
EPP_SSL_VERIFY_PEER_NAME=true
EPP_SSL_ALLOW_SELF_SIGNED=false
EPP_SSL_CAFILE=/path/to/ca.crt
EPP_SSL_LOCAL_CERT=/path/to/client.crt
EPP_SSL_LOCAL_PK=/path/to/client.key
EPP_SSL_PASSPHRASE=your-passphrase

Usage

You can use the EPP facade to interact with the EPP server:

use DreamHun\EPP\Facades\EPP;

// Connect to the EPP server
$greeting = EPP::connect();

// Login to the server
$response = EPP::login();

// Check domain availability
$xml = <<<XML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <command>
    <check>
      <domain:check xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
        <domain:name>example.com</domain:name>
      </domain:check>
    </check>
    <clTRID>ABC-12345</clTRID>
  </command>
</epp>
XML;

$response = EPP::request($xml);

Development

Testing

# Run all tests
composer test

# Run tests with coverage report
composer test:coverage

Code Style

The package follows PSR-12 coding standards. You can check and fix the code style using:

# Check code style
composer cs

# Fix code style issues
composer format

Static Analysis

composer analyse

License

This package is open-sourced software licensed under the MIT license.

Credits

Contributing

Thank you for considering contributing to the EPP Client Library! Please feel free to submit a PR.