PHPackages                             max13/url-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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. max13/url-parser

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

max13/url-parser
================

URL parser for PHP, allow you to extract every piece of information of a URL/HOST, structured and clean.

v1.0.0(12y ago)3650CC-BY-NC-SA-3.0PHP &gt;=5.3.0

Since Nov 14Compare

[ Source](https://github.com/Max13/MXUrlParser-PHP)[ Packagist](https://packagist.org/packages/max13/url-parser)[ Docs](http://github.com/Max13/MXUrlParser-PHP)[ RSS](/packages/max13-url-parser/feed)WikiDiscussions Synced 4d ago

READMEChangelogDependencies (1)Versions (10)Used By (0)

MXUrlParser-PHP
===============

[](#mxurlparser-php)

Description
-----------

[](#description)

**MXUrlParser** is capable of parsing a complete URL and extract some parts of it like the URL parts (using php [`parse_url()`](http://php.net/parse_url) function) and some domain name parts (using [Mozilla public suffix list](http://publicsuffix.org)).

Available parts are (Assuming URL is `https://dev.api.example.co.uk/1/2/3?key=val#anchor`):

- `scheme`: `https`
- `host`: `dev.api.example.co.uk`
- `path`: `/1/2/3`
- `query`: `key=val`
- `fragment`: `anchor`
- `subdomain`: `dev`
- `domain`: `api.example`
- `tld`: `co.uk`

Required
--------

[](#required)

- PHP &gt;= `5.3`

How to download
---------------

[](#how-to-download)

There are several ways to download **MxUrlParser-PHP**:

- Install with composer (`"max13/url-parser": "dev-master"`)
- Clone the [github repository](https://github.com/Max13/MXUrlParser-PHP) with `git clone  []`
- Download the zip file on [github](https://github.com/Max13/MXUrlParser-PHP) directly
- Try to find another one by yourself :/

Then place it where you want (readable location, in order to load it).

How to use
----------

[](#how-to-use)

Let's say your URL is: `dev.api.example.co.uk/1/2/3?key=val#anchor`

You can parse it with the `MX\UrlParser\UrlParser` class:

```

```

That's it, as simple as this...!

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 94.1% 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 ~1 days

Total

9

Last Release

4603d ago

Major Versions

v0.1.4-p2 → v1.0.02013-11-25

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/531249?v=4)[Adnan RIHAN](/maintainers/Max13)[@Max13](https://github.com/Max13)

---

Top Contributors

[![Max13](https://avatars.githubusercontent.com/u/531249?v=4)](https://github.com/Max13 "Max13 (16 commits)")[![jaywilliams](https://avatars.githubusercontent.com/u/3330?v=4)](https://github.com/jaywilliams "jaywilliams (1 commits)")

---

Tags

urllaravelparserurl-parser

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/max13-url-parser/health.svg)

```
[![Health](https://phpackages.com/badges/max13-url-parser/health.svg)](https://phpackages.com/packages/max13-url-parser)
```

###  Alternatives

[zenstruck/uri

Object-oriented wrapper/manipulator for parse\_url with additional features.

1780.5k6](/packages/zenstruck-uri)[pherum/laravel-bbcode

Parse your BBCode easy with this library.

2531.2k](/packages/pherum-laravel-bbcode)

PHPackages © 2026

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