Download the PHP package domainreseller/php-dna without Composer
On this page you can find all versions of the php package domainreseller/php-dna. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download domainreseller/php-dna
More information about domainreseller/php-dna
Files in domainreseller/php-dna
Package php-dna
Short Description DomainNameAPI PHP Library for Domain Management
License MIT
Informations about the package php-dna
Installation and Integration Guide
Minimum Requirements
- PHP7.4 or higher (Recommended 8.1)
- PHP SOAPClient extension must be active (for SOAP mode).
- PHP cURL extension must be active (for REST mode).
SOAP vs REST API
The library supports two API modes. The mode is automatically selected based on the username format:
| Mode | Username Format | Example |
|---|---|---|
| SOAP (Legacy) | Regular username | myreseller |
| REST (New) | UUID format | fd2bea54-99ea-16b6-c195-3a1b9079df00 |
Both modes return the same response structure, so you can switch between them without changing your integration code.
A) Manual Usage
Download the files and examine the examples in the examples folder.
B) Composer Integration
Usage
Domain Registration
Note: Additional parameters are required for .tr domains. The Additional parameter is used for domain names that require extra information like .tr.
Sample Output for Domain Registration
Domain Renewal
Sample Output for Domain Renewal
Domain Transfer
Sample Output for Domain Transfer
Domain List
Sample Output for Domain List
TLD List
Sample Output for TLD List
Domain Availability Check
Sample Output for Domain Availability Check
Domain Details
Sample Output for Domain Details
Nameserver Modification
Sample Output for Nameserver Modification
Enable Domain Lock
Sample Output for Enable Domain Lock
Disable Domain Lock
Sample Output for Disable Domain Lock
Add Child Nameserver
Sample Output for Add Child Nameserver
Delete Child Nameserver
Sample Output for Delete Child Nameserver
Update Child Nameserver
Sample Output for Update Child Nameserver
Modify Domain Privacy
Sample Output for Modify Domain Privacy
Save Domain Contacts
Sample Output for Save Domain Contacts
Get Reseller Details
Sample Output for Get Reseller Details
Testing
The library includes PHPUnit tests that verify both SOAP and REST API response structures match.
Setup
-
Create a
.env.testfile in the project root: -
Run all tests:
- Run specific test suites:
Test Structure
| Test File | Description |
|---|---|
tests/SoapReadTest.php |
SOAP API read operations (GetDetails, GetList, CheckAvailability, etc.) |
tests/SoapWriteTest.php |
SOAP API write operations (ModifyNameServer, Lock, ChildNS, etc.) |
tests/RestReadTest.php |
REST API read operations |
tests/RestWriteTest.php |
REST API write operations |
Return and Error Codes with Descriptions
| Code | Description | Detail |
|---|---|---|
| 1000 | Command completed successfully | Operation successful. |
| 1001 | Command completed successfully; action pending | Operation successful. However, the operation is currently queued for completion. |
| 2003 | Required parameter missing | Parameter missing error. For example, no phone entry in contact information. |
| 2105 | Object is not eligible for renewal | Domain status is not suitable for renewal, locked for update operations. Status should not be "clientupdateprohibited". May be due to other status conditions. |
| 2200 | Authentication error | Authorization error, security code is incorrect or domain is registered with another registrar. |
| 2302 | Object exists | Domain name or nameserver information already exists in database. Cannot be registered. |
| 2303 | Object does not exist | Domain name or nameserver information does not exist in database. New registration required. |
| 2304 | Object status prohibits operation | Domain status is not suitable for updates, locked for update operations. Status should not be "clientupdateprohibited". May be due to other status conditions. |
| CODE | DETAIL |
|---|---|
| 101 | System Error Detailed For ({0})! |
| 102 | Multiple Errors Detailed For ({0})! |
| 103 | Unknown Errors Detailed For ({0})! |
| 200 | API command not found ({0})! |
| 210 | API service not found ({0})! |
| 211 | API service provider not set! |
| 300 | Reseller not found! |
| 301 | Your current IP address is not authorized to access. Please make sure you are connecting from an authorized IP address and try again |
| 310 | TLD is not supported! |
| 320 | API not found! |
| 321 | Currency is not supported! |
| 330 | Required parameter(s) not set ({0}). |
| – | Make sure you send all contact objects full |
| 340 | Price definition not found ({0}[{1}]-{2}{3}). |
| 350 | Insufficient reseller balance. (Reseller Id : {0} - Current Balance : {1} {2}). |
| 350 | Accounting currency does not match or the balance is not sufficient. |
| 360 | Invalid API request for field ({0}). |
| 360 | API quota exceeded! |
| 361 | Throttled error! |
| 362 | Premium domain is not available to register right now. |
| 363 | Operation cancelled because domain in auto-renewal period |
| 364 | This domain is currently unavailable for transaction due to a problem with the registry |
| CODE | DETAIL |
|---|---|
| 400 | Invalid contact ({0}). |
| 401 | Contact info can not sync. |
| 402 | No access to contact information from registry. |
| 403 | THE SYSTEM HAS MISSING INFORMATION. ENTER YOUR DEFAULT INFORMATION OR CONTACT SUPPORT TEAM. |
| 404 | DOMAIN CONTACT CANNOT UPDATE. PERMISSION FROM THE REGISTRY. |
| 410 | Contact not found. |
| 410 | Contact not found ({0}). |
| 420 | Invalid Api command for contact {0}. |
| 430 | Contact api not found. |
| 440 | Contact is not synced. |
| 450 | Too many domain contacts! |
| 451 | Failed to proceed with contact update. |
| CODE | DETAIL |
|---|---|
| 500 | Invalid domain id. |
| 500 | Invalid domain id ({0}). |
| 501 | Domain could not synchronized({0}) |
| 502 | Internal transfer failed |
| 503 | Domain registration is not available. |
| 504 | Domain information does not match. Before :{0} |
| 505 | Enter the Ip Address. |
| 506 | Domain Transfer Has Been Started But Contact Info Not Read. |
| 507 | Authorization error. |
| 510 | Domain not found. |
| 511 | Expired domains cannot be found. |
| 512 | Domain is not renewable. |
| 513 | Domain is not in updateable status. It must be active for to be updated |
| 514 | Redemption Period Expected. |
| 520 | Invalid Api command for domain "{0}". |
| 530 | Invalid domain period. Period must be {0} to {1} years. Requested period is {2} years. |
| 540 | Domain cannot be extended beyond {0} years from current date. |
| 550 | Invalid domain name. Domain must be {0} to {1} characters length. Requested domain name is {2} characters. |
| 560 | Invalid name server count. Domain must have {0} to {1} name servers. Requested name server count is {2}. |
| 561 | No name server information found in the incoming request |
| 570 | Idn not supported for tld "{0}". |
| 571 | Period invalid. |
| 572 | Command invalid. |
| 573 | Domain names not found. |
| 574 | TLD names not found. |
| 575 | Domain is not in updateable status. It must be active for name servers to be updated |
| 576 | Domain can be renewed in the last 1 month before the expire date |
| 580 | Transfer not supported for tld "{0}". |
| 581 | Child name server not found |
| 582 | Transfer started by other reseller. |
| 583 | Transfer not initialized. Please contact the support team. |
| 584 | Object status prohibits operation |
| 590 | Auth code is required for this transfer. |
| 591 | Auth code is not valid. |
| 592 | Transfer lock exists on domain. |
| 593 | Domain cannot be transferred, Status Information and Transfer Lock must comply with the required criteria. (Status Information: #ok) |
| 594 | Domain name server address could not resolved ({0}) |
| 595 | Contact information can not be read (whois.registrar.tld) Please make sure that privacy protection status open |
| 596 | Contact information could not verified |
| 597 | Tld Not Found |
| 598 | Unknown error occurred |
| 599 | Domain Forward Not Found |
All versions of php-dna with dependencies
ext-soap Version *
ext-json Version *
ext-curl Version *