PHPackages                             monovm/whois-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. monovm/whois-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

monovm/whois-php
================

This PHP package enables developers to retrieve domain registration information and check domain availability via socket protocol. It's a useful tool for web developers and domain name registrars.

v1.3.11(3w ago)566.2k—1.4%6MITPHPPHP &gt;=7.4

Since Feb 22Pushed 3w ago1 watchersCompare

[ Source](https://github.com/monovm/whois-php)[ Packagist](https://packagist.org/packages/monovm/whois-php)[ RSS](/packages/monovm-whois-php/feed)WikiDiscussions main Synced yesterday

READMEChangelog (10)Dependencies (4)Versions (32)Used By (0)

⚡ Simple and Fast Domain Whois Lookup in PHP ⚡
==============================================

[](#zap-simple-and-fast-domain-whois-lookup-in-php-zap)

Simple and Fast Domain Whois Lookup in PHP

This PHP whois package enables developers to retrieve domain registration information and check domain availability via socket protocol. It's a useful tool for web developers and domain name registrars.

based on WHMCS domain Whois class.

📜 Installation
--------------

[](#scroll-installation)

You can install the whois package via composer:

```
composer require monovm/whois-php
```

▶️ Checker class
----------------

[](#arrow_forward-checker-class)

You can use this class to check one or multiple domains availability.

🎓 Usage/Examples
----------------

[](#mortar_board-usageexamples)

```
use MonoVM\WhoisPhp\Checker;

// Single Domain whois
$result1 = Checker::whois('monovm.com');

// Single Domain whois without specifying TLD
$result2 = Checker::whois('monovm');

// Multiple domains whois
$result3 = Checker::whois(['monovm','google.com','bing']);
```

- ### Response

    [](#response)

An associative array with domains as keys and status as values. Current statuses: available, unavailable, premium

```
$result1: ['monovm.com'=>'unavailable']
$result2: ['monovm.com'=>'unavailable','monovm.net'=>'unavailable','monovm.org'=>'unavailable','monovm.info'=>'unavailable']
$result3: [
            'monovm.com'=>'premium',
            'monovm.net'=>'unavailable',
            'monovm.org'=>'unavailable',
            'monovm.info'=>'unavailable',
            'google.com'=>'premium',
            'bing.com'=>'unavailable',
            'bing.net'=>'unavailable',
            'bing.org'=>'available',
            'bing.info'=>'unavailable'
           ]

```

### 🔥 popularTLDs Configuration

[](#fire-populartlds-configuration)

When TLD is not specified in the domain string (eg:monovm instead of monovm.com), Checker class will automatically lookup a list of popular TLDs for the entered name.

You can customize this list by passing an options array as second parameter of whois method.

```
use MonoVM\WhoisPhp\Checker;

$result = Checker::whois('monovm', ['popularTLDs' => ['.com', '.net', '.org', '.info']]);
```

▶️ WhoisHandler class
---------------------

[](#arrow_forward-whoishandler-class)

🎓 Usage/Examples
----------------

[](#mortar_board-usageexamples-1)

```
use MonoVM\WhoisPhp\WhoisHandler;

$whoisHandler = WhoisHandler::whois('monovm.com');
```

#### Available methods:

[](#available-methods)

**After initiating the handler method you will have access to the following methods:**

MethodDescription`isAvailable`Returns true if the domain is available for registration (uses enhanced detection)`isValid`Returns true if the domain can be looked up`getWhoisMessage`Returns the whois server message as a string including availability, validation or the domain whois information`getTld`Returns the top level domain of the entered domain as a string`getSld`Returns the second level domain of the entered domain as a string`getAvailabilityDetails`Returns detailed information about how availability was determined (debug method)🟢 `isAvailable()` method uses enhanced detection with multiple methods to accurately determine domain availability. It combines the original library's built-in check with additional detection methods including:

- **Availability keywords detection**: Searches for phrases like "no match", "not found", "available", etc.
- **Response length analysis**: Short responses often indicate availability
- **Pattern matching**: Uses regex patterns to identify availability indicators
- **TLD-specific patterns**: Different TLDs use different availability messages
- **Domain status indicators**: Checks for explicit status fields
- **Registration field analysis**: Absence of registration details may indicate availability

```
$available = $whoisHandler->isAvailable();
```

🟢 `isValid()` method checks whether the entered domain name is valid and can be looked up or not.

```
$valid = $whoisHandler->isValid();
```

🟢 The `getWhoisMessage()` method is used to retrieve the WHOIS information of a domain. This method returns a string that includes the WHOIS server message, which may contain information about the availability and validation of the domain, as well as its WHOIS information.

```
$message = $whoisHandler->getWhoisMessage();
```

🟢 `getTld()` method is used to extract the top level domain (TLD) of a given domain. For example, if the domain name passed to the handler is "monovm.com", the method will return "com" as the TLD. Similarly, if the domain name is "monovm.co.uk", the method will return "co.uk" as the TLD.

```
$tld = $whoisHandler->getTld();
```

🟢 `getSld()` method returns the second level domain of the entered domain as a string. The second level domain is the part of the domain name that comes before the top level domain, and it is typically the main part of the domain that identifies the website or organization. For example, in the domain name "monovm.com", the second level domain is "monovm".

```
$sld = $whoisHandler->getSld();
```

🟢 `getAvailabilityDetails()` method provides detailed debugging information about how the domain availability was determined. This method returns an array containing the results of each detection method:

```
$details = $whoisHandler->getAvailabilityDetails();

// Example output:
// Array
// (
//     [original_library_result] => false
//     [contains_availability_keywords] => true
//     [is_response_too_short] => false
//     [contains_no_match_patterns] => true
//     [tld_specific_patterns] => false
//     [domain_status_indicators] => false
//     [final_availability] => true
//     [whois_message_length] => 1234
//     [whois_message_preview] => "No match for domain example123.com..."
// )
```

✨ Enhanced Availability Detection
---------------------------------

[](#sparkles-enhanced-availability-detection)

The enhanced availability detection system uses 6 different methods to ensure accurate results:

1. **Original Library Check**: Uses the built-in whois server response analysis
2. **Keyword Detection**: Searches for over 40 availability-related keywords in multiple languages
3. **Response Length Analysis**: Analyzes response size and meaningful content lines
4. **Pattern Matching**: Uses regex patterns to identify availability indicators
5. **TLD-Specific Patterns**: Applies specialized patterns for different TLDs (.com, .uk, .de, etc.)
6. **Status Indicators**: Checks for explicit domain status fields and registration data presence

This multi-layered approach significantly improves accuracy across different WHOIS servers and TLD registries.

🌐 Whois Server List
-------------------

[](#globe_with_meridians-whois-server-list)

### Almost all TLDs are supported.

[](#almost-all-tlds-are-supported)

🌐 Contributing
--------------

[](#globe_with_meridians-contributing)

If you want to add support for new TLD, extend functionality or correct a bug, feel free to create a new pull request at Github's repository

⚖️ License
----------

[](#balance_scale-license)

[MIT](https://choosealicense.com/licenses/mit/)

💻 Support
---------

[](#computer-support)

For support, email .

[MonoVM.com](https://monovm.com)

[![Logo](https://camo.githubusercontent.com/bfd331c07fa9714b4812f9b4b687c63dce6f8fb0f4d5a63cac9de7eb91c9207f/68747470733a2f2f6d6f6e6f766d2e636f6d2f736974652d6173736574732f696d616765732f6c6f676f2d6d6f6e6f766d2e737667)](https://camo.githubusercontent.com/bfd331c07fa9714b4812f9b4b687c63dce6f8fb0f4d5a63cac9de7eb91c9207f/68747470733a2f2f6d6f6e6f766d2e636f6d2f736974652d6173736574732f696d616765732f6c6f676f2d6d6f6e6f766d2e737667)

###  Health Score

54

—

FairBetter than 96% of packages

Maintenance94

Actively maintained with recent releases

Popularity37

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~40 days

Recently: every ~60 days

Total

31

Last Release

26d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f5c284a2bc7a21425bf7fa4a51d46e05d2244a1f3afcab40e9e9d31d8481aae5?d=identicon)[monovm](/maintainers/monovm)

---

Top Contributors

[![behzadsp](https://avatars.githubusercontent.com/u/58994682?v=4)](https://github.com/behzadsp "behzadsp (49 commits)")[![sina-nasiri](https://avatars.githubusercontent.com/u/131159558?v=4)](https://github.com/sina-nasiri "sina-nasiri (6 commits)")[![mr-rabiei22](https://avatars.githubusercontent.com/u/42730354?v=4)](https://github.com/mr-rabiei22 "mr-rabiei22 (1 commits)")

---

Tags

domaindomain-checkerdomain-lookupdomain-registrationdomain-whoisphpwhoiswhois-lookupphpwhois

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/monovm-whois-php/health.svg)

```
[![Health](https://phpackages.com/badges/monovm-whois-php/health.svg)](https://phpackages.com/packages/monovm-whois-php)
```

###  Alternatives

[phpwhois/phpwhois

phpWhois - library for querying whois services and parsing results. Based on phpwhois.org

321393.9k1](/packages/phpwhois-phpwhois)[novutec/whoisparser

Lookup domain names, IP addresses and AS numbers by WHOIS.

392.0M1](/packages/novutec-whoisparser)[kevinoo/phpwhois

phpWhois - library for querying whois services and parsing results.

1493.8k1](/packages/kevinoo-phpwhois)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
