sandwave-io / epp-client-php
A base EPP Client that complies with RFC 5730, 5731 and 5733.
dev-main
2024-10-10 13:47 UTC
Requires
- php: ^8.1
- ext-curl: *
- ext-dom: *
- ext-libxml: *
- nesbot/carbon: ~1.39.1
- psr/log: ^1.1.4
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.14.4
- phpstan/phpstan: ^1.10.6
- phpunit/phpunit: ^10.0.15
- sandwave-io/php-cs-fixer-config: ^1.0
This package is auto-updated.
Last update: 2024-11-10 13:58:00 UTC
README
EPP Client (PHP)
Support
This client implements several registries using their EPP API. The base implementation complies with the following RFCs:
The following registries are supported:
- SIDN (.nl)
Are you missing functionality? Feel free to create an issue, or hit us up with a pull request.
How to use
composer require sandwave-io/epp-client-php
use SandwaveIo\EppClient\Epp\Connection; use SandwaveIo\EppClient\Epp\ConnectionDriver\HttpsConnectionDriver; use SandwaveIo\EppClient\Services\SidnService; $driver = new HttpsConnectionDriver('test.domain-registry.nl', 12345); $service = new SidnService(new Connection($driver), 'admin', 'secret'); $availability = $service->checkDomains(['example.com', 'example.net', 'example.org']); foreach ($availability as $domainCheck) { if ($domainCheck->isAvailable) { echo "Domain: {$domainCheck->domain} AVAILABLE\n"; } else { echo "Domain: {$domainCheck->domain} TAKEN. Reason: {$domainCheck->reason}\n"; } }
How to contribute
Feel free to create a PR if you have any ideas for improvements. Or create an issue.
- When adding code, make sure to add tests for it (phpunit).
- Make sure the code adheres to our coding standards (use php-cs-fixer to check/fix).
- Also make sure PHPStan does not find any bugs.
vendor/bin/php-cs-fixer fix vendor/bin/phpstan analyze vendor/bin/phpunit --coverage-text
These tools will also run in GitHub actions on PR's and pushes on master.