PHPackages                             hugsbrugs/php-whois - 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. hugsbrugs/php-whois

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

hugsbrugs/php-whois
===================

Convenient methods for querying whois

14981PHP

Since Jun 24Pushed 9y ago1 watchersCompare

[ Source](https://github.com/hugsbrugs/php-whois)[ Packagist](https://packagist.org/packages/hugsbrugs/php-whois)[ RSS](/packages/hugsbrugs-php-whois/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

php-whois
=========

[](#php-whois)

Installation
------------

[](#installation)

```
composer require hugsbrugs/php-whois

```

Tests
-----

[](#tests)

Open in your browser

```
/vendor/hugsbrugs/php-whois/examples/simple-example.php

```

Usage
-----

[](#usage)

```
require_once __DIR__ . '/../vendor/autoload.php';

use HugsBrugs\HugWhois\HugWhois as HugWhois;

$domain_or_ip = 'sport24.lefogaro.fr'; // '212.95.72.8'

# Create Whois object
$HugWhois = new HugWhois($domain_or_ip);

$whois = [];

# Query whois database and return whois text as UTF-8
$whois['text'] = $HugWhois->get_whois_text();

$whois['is_ip'] = $HugWhois->is_ip();

# Is this tld available ?
$whois['is_available'] = $HugWhois->is_available();

# Extract whois informations
$whois['infos'] = $HugWhois->extract_infos();

# Extract all mails from whois
$whois['mails'] = $HugWhois->get_mails();
$whois['registrant_emails'] = $HugWhois->extract_whois_registrant_emails();
$whois['registrar_emails'] = $HugWhois->extract_whois_registrar_emails();

# Return whois as HTML (\n replaced by )
//$whois['html'] = $HugWhois->whois_html();

# helper functions
$whois['registrable_domain'] = $HugWhois->get_registrable_domain();
$whois['domain'] = $HugWhois->get_domain();
$whois['hostname'] = $HugWhois->get_hostname();
$whois['full_host'] = $HugWhois->get_full_host();
$whois['tlds'] = $HugWhois->get_tld();
$whois['subdomain'] = $HugWhois->get_sub_domain();

# Print
echo $tld . ' : ';
echo '';print_r($whois);echo '';

```

### Similar librairies

[](#similar-librairies)

[phpWhois/phpWhois](https://github.com/phpWhois/phpWhois)

[regru/php-whois](https://github.com/regru/php-whois)

[phpwhois.org](http://www.phpwhois.org/)

### Ressources

[](#ressources)

()

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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.

### Community

Maintainers

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

---

Tags

phpphp-whoiswhois

### Embed Badge

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

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

###  Alternatives

[magepal/magento2-googletagmanager

Google Tag Manager (GTM) for Magento 2 with Advance Data Layer

2671.5M4](/packages/magepal-magento2-googletagmanager)[beechit/default-upload-folder

Make it possible to configure the default upload folder for a certain TCA column

13127.6k](/packages/beechit-default-upload-folder)

PHPackages © 2026

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