PHP Client for Nic.dz provides an easy-to-use interface for checking .dz domains through the official nic.dz Public API.
Effortlessly check domain availability or retrieve detailed WHOIS information for .dz
domain extensions.
- PHP 8.0 or higher
Install the package via Composer:
composer require piteurstudio/php-nicdz
Easily verify if a .dz
domain is available:
use PiteurStudio\NicDz;
include 'vendor/autoload.php';
$domainChecker = new NicDz('example-domain.dz');
$isAvailable = $domainChecker->isAvailable(); // Returns boolean: true if available, false otherwise
Note: The package supports valid .dz
extensions including: .gov.dz
, .org.dz
, .com.dz
, .net.dz
, .edu.dz
, .asso.dz
, .pol.dz
, .art.dz
, .soc.dz
, .tm.dz
.
Get detailed WHOIS information in various formats:
$domainChecker = new NicDz('piteur-studio.dz');
// As an array
$whoisDataArray = $domainChecker->whois()->toArray();
// As an object
$whoisDataObject = $domainChecker->whois()->toObject();
// As a raw string
$whoisDataString = $domainChecker->whois()->toString();
// As JSON
$whoisDataJson = $domainChecker->whois()->toJson();
Run the tests with:
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
This package is not officially affiliated with or endorsed by nic.dz. The NIC.dz name, logo, and trademarks are the property of nic.dz.
This package is open-sourced software licensed under the MIT License..