PHPackages                             league/uri-hostname-parser - 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. league/uri-hostname-parser

Abandoned → [jeremykendall/php-domain-parser](/?search=jeremykendall%2Fphp-domain-parser)ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

league/uri-hostname-parser
==========================

ICANN base hostname parsing implemented in PHP.

1.1.2(5y ago)1986.5M—4.4%5MITPHPPHP &gt;=7.0

Since Nov 21Pushed 5y ago5 watchersCompare

[ Source](https://github.com/thephpleague/uri-hostname-parser)[ Packagist](https://packagist.org/packages/league/uri-hostname-parser)[ Docs](https://github.com/thephphleague/uri-hostname-parser)[ RSS](/packages/league-uri-hostname-parser/feed)WikiDiscussions master Synced 1mo ago

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

Uri Hostname Parser
===================

[](#uri-hostname-parser)

This package is EOL since 2018-02-16
====================================

[](#this-package-is-eol-since-2018-02-16)

**This repository was a temporary workaround for**

- **[PHP Domain Parser v3.0](https://github.com/jeremykendall/php-domain-parser/releases/tag/3.0.0)**
- **used by [League URI v5](https://github.com/thephpleague/uri/releases/tag/5.2.0).**

**You should instead use:**

- **[The latest League URI package](https://github.com/thephpleague/uri/releases).**
- **[The latest PHP Domain Parser](https://github.com/jeremykendall/php-domain-parser/releases).**

[![Build Status](https://camo.githubusercontent.com/5f762353c08e6301f6e59d29290dfffee1ddeec2e60d43141e43b3c4d2321053/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7468657068706c65616775652f7572692d686f73746e616d652d7061727365722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/thephpleague/uri-hostname-parser)[![Latest Version](https://camo.githubusercontent.com/efe3dfcb439f9ea47c6c028d9a65481a358c4e3c13183165d4e6515a8f124d85/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f7468657068706c65616775652f7572692d686f73746e616d652d7061727365722e7376673f7374796c653d666c61742d737175617265)](https://github.com/thephpleague/uri-hostname-parser/releases)

This package contains a lightweight domain parser using the [Public Suffix List (PSL) ICANN section](http://publicsuffix.org/) based on the excellent work by [Jeremy Kendall](https://github.com/jeremykendall/php-domain-parser/).

**WARNING: Some people use the PSL to determine what is a valid domain name and what isn't. This is dangerous, particularly in these days where new gTLDs are arriving at a rapid pace, if your software does not regularly receive PSL updates, because it will erroneously think new gTLDs are not valid. The DNS is the proper source for this in normal condition. If you must use it for this purpose, please do not bake static copies of the PSL into your software with no update mechanism.**

System Requirements
-------------------

[](#system-requirements)

You need:

- **PHP &gt;= 7.0** but the latest stable version of PHP is recommended
- the `mbstring` extension
- the `intl` extension
- the `curl` extension

Dependencies
------------

[](#dependencies)

- [PSR-16](http://www.php-fig.org/psr/psr-16/)

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

[](#installation)

```
$ composer require league/uri-hostname-parser

```

Documentation
-------------

[](#documentation)

Full documentation can be found at [uri.thephpleague.com](https://uri.thephpleague.com).

Contributing
------------

[](#contributing)

Contributions are welcome and will be fully credited. Please see [CONTRIBUTING](.github/CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Testing
-------

[](#testing)

`Uri Hostname Parser` has a [PHPUnit](https://phpunit.de) test suite and a coding style compliance test suite using [PHP CS Fixer](http://cs.sensiolabs.org/). To run the tests, run the following command from the project folder.

```
$ composer test
```

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Ignace Nyamagana Butera](https://github.com/nyamsprod)
- [Jeremy Kendall](https://github.com/jeremykendall/)
- [All Contributors](https://github.com/thephpleague/uri-hostname-parser/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

Attribution
-----------

[](#attribution)

This work is based on a Fork of [PHP Domain Parser](https://github.com/jeremykendall/php-domain-parser/)

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity57

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 82.2% 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 ~150 days

Recently: every ~298 days

Total

9

Last Release

1899d ago

Major Versions

0.1.0 → 1.0.02017-11-22

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/534693?v=4)[Frank de Jonge](/maintainers/frankdejonge)[@frankdejonge](https://github.com/frankdejonge)

![](https://avatars.githubusercontent.com/u/51073?v=4)[Ignace Nyamagana Butera](/maintainers/nyamsprod)[@nyamsprod](https://github.com/nyamsprod)

---

Top Contributors

[![jeremykendall](https://avatars.githubusercontent.com/u/288613?v=4)](https://github.com/jeremykendall "jeremykendall (281 commits)")[![nyamsprod](https://avatars.githubusercontent.com/u/51073?v=4)](https://github.com/nyamsprod "nyamsprod (41 commits)")[![irfanevrens](https://avatars.githubusercontent.com/u/166640?v=4)](https://github.com/irfanevrens "irfanevrens (6 commits)")[![Saeven](https://avatars.githubusercontent.com/u/887224?v=4)](https://github.com/Saeven "Saeven (3 commits)")[![huglester](https://avatars.githubusercontent.com/u/150731?v=4)](https://github.com/huglester "huglester (3 commits)")[![mikegreiling](https://avatars.githubusercontent.com/u/812328?v=4)](https://github.com/mikegreiling "mikegreiling (2 commits)")[![geekwright](https://avatars.githubusercontent.com/u/3181636?v=4)](https://github.com/geekwright "geekwright (2 commits)")[![StyleT](https://avatars.githubusercontent.com/u/1125900?v=4)](https://github.com/StyleT "StyleT (1 commits)")[![samsonasik](https://avatars.githubusercontent.com/u/459648?v=4)](https://github.com/samsonasik "samsonasik (1 commits)")[![steffenweber](https://avatars.githubusercontent.com/u/1138129?v=4)](https://github.com/steffenweber "steffenweber (1 commits)")[![arendjantetteroo](https://avatars.githubusercontent.com/u/713066?v=4)](https://github.com/arendjantetteroo "arendjantetteroo (1 commits)")

---

Tags

hostnameicannphppslpsl-icannpsl-rulesuriPublic Suffix Listdomain parsingicann

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/league-uri-hostname-parser/health.svg)

```
[![Health](https://phpackages.com/badges/league-uri-hostname-parser/health.svg)](https://phpackages.com/packages/league-uri-hostname-parser)
```

###  Alternatives

[jeremykendall/php-domain-parser

Public Suffix List and IANA Root Zone Database based Domain parsing implemented in PHP.

1.2k13.0M77](/packages/jeremykendall-php-domain-parser)[illuminate/contracts

The Illuminate Contracts package.

705122.9M10.1k](/packages/illuminate-contracts)[phiki/phiki

Syntax highlighting using TextMate grammars in PHP.

3573.0M23](/packages/phiki-phiki)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)[flow-php/etl

PHP ETL - Extract Transform Load - Abstraction

374468.4k51](/packages/flow-php-etl)[gehrisandro/tailwind-merge-php

TailwindMerge for PHP merges multiple Tailwind CSS classes by automatically resolving conflicts between them

1391.5M9](/packages/gehrisandro-tailwind-merge-php)

PHPackages © 2026

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