Download the PHP package namingo/registrars without Composer
On this page you can find all versions of the php package namingo/registrars. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package registrars
Namingo Registrars
A unified PHP library for working with multiple domain registrars through one consistent API.
Namingo Registrars provides a common interface for domain availability checks, registrations, renewals, transfers, domain management, and other registrar operations. Applications can work with different registrar providers without implementing each provider API separately.
Features
- Unified interface for multiple domain registrars
- Domain availability checks
- Domain registration
- Domain renewal
- Domain transfers
- Domain information retrieval
- Authorization-code retrieval
- Transfer-status checks
- Contact management
- Nameserver configuration
- Domain suggestions
- Auto-renew management
- Test and production API support
- Extensible registrar adapter architecture
Supported registrars
The following adapters are currently available:
- Name.com
- OpenSRS
Additional registrar adapters may be added without changing the public library interface.
Requirements
- PHP 8.3 or later
- PHP cURL extension
- Composer
Verify that the cURL extension is enabled:
Installation
Install the package with Composer:
Until the package is published on Packagist, it can be installed from a local path or directly from its Git repository.
Local Composer repository
Add the repository to your application's composer.json:
Then run:
Basic usage
Load the Composer autoloader:
Name.com example
Use the production API endpoint when working with a live Name.com account:
Use the development endpoint for testing:
OpenSRS example
Creating a contact
Registering a domain
A custom nameserver list can also be provided:
Checking availability
Retrieving domain information
Renewing a domain
Transferring a domain
Custom nameservers can be supplied during the transfer:
Retrieving an authorization code
Checking transfer status
Updating domain settings
Domain suggestions
Error handling
Registrar API requests may fail because of invalid credentials, malformed domain data, unavailable provider services, account restrictions, or network errors.
Production integrations should wrap registrar calls in exception handling:
Do not expose registrar credentials, API responses containing private data, or internal exception details to end users.
Creating an adapter
Registrar integrations are implemented as adapters. A new adapter should implement the library's registrar adapter contract and translate the common Namingo Registrars operations into requests supported by the upstream provider.
An adapter is responsible for:
- Authentication
- API request construction
- Provider-specific response parsing
- Error normalization
- Mapping provider data to Namingo Registrars objects
- Distinguishing test and production environments
Provider-specific behavior should remain inside the adapter so applications can continue using the same public interface.
Namespace
The package uses the following root namespace:
Examples:
Security
Registrar credentials provide access to valuable domain assets. Applications using this library should:
- Store credentials outside the source code
- Use environment variables or a secrets manager
- Restrict access to configuration files
- Use test endpoints during development
- Log failures without logging passwords or API tokens
- Validate domain names and contact information before sending requests
- Keep PHP and package dependencies updated
Example environment variables:
Project status
Namingo Registrars is under active development.
Interfaces and adapter behavior may change before the first stable release. Test registrar operations carefully before using the library with production accounts.
Acknowledgements
Namingo Registrars is based on the registrar API implementation from the Utopia Domains project.
Original project authors: Eldad Fux and Wess Cope.
The original software is distributed under the MIT License.
Namingo Registrars contains modifications, namespace changes, additional integrations, and continued development maintained by the Namingo project.
License
Namingo Registrars is distributed under the MIT License.
This project includes software derived from Utopia Domains.