PHPackages                             aboustayyef/url-resolver - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. aboustayyef/url-resolver

ActiveLibrary[HTTP &amp; Networking](/categories/http)

aboustayyef/url-resolver
========================

Redirects to final url

2608PHP

Since Sep 29Pushed 10y ago2 watchersCompare

[ Source](https://github.com/aboustayyef/URLResolver)[ Packagist](https://packagist.org/packages/aboustayyef/url-resolver)[ RSS](/packages/aboustayyef-url-resolver/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Welcome to URLResolver.php
==========================

[](#welcome-to-urlresolverphp)

This is a fork of URL Resolver by Matt Wright and contributors that works with composer and conforms to psr-4.

URLResolver.php is a PHP class that attempts to resolve URLs to a final, canonical link. On the web today, link shorteners, tracking codes and more can result in many different links that ultimately point to the same resource. By following HTTP redirects and parsing web pages for open graph and canonical URLs, URLResolver.php attempts to solve this issue.

Patterns Recognized
-------------------

[](#patterns-recognized)

- Follows 301, 302, and 303 redirects found in HTTP headers
- Follows [Open Graph](https://developers.facebook.com/docs/opengraph/) URL &lt;meta&gt; tags found in web page &lt;head&gt;
- Follows [Canonical](http://www.google.com/support/webmasters/bin/answer.py?answer=139394) URL &lt;link&gt; tags found in web page &lt;head&gt;
- Aborts download quickly if content type is not an HTML page

I am open to additional suggestions for improvement.

Usage
-----

[](#usage)

Resolving a URL can be as easy as:

```
	use Resolver\URLResolver ;

	$resolver = new URLResolver();

	$resolver->isDebugMode(true);
	$resolver->setMaxRedirects(10);
	$resolver->setCookieJar('/mycookie.cookie');
	$resolver->setUserAgent('Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36');
	$resolver->resolveURL('http://t.co/Hb6cX2JyGM');

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 64.7% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/56cd19dcd01cad924d57c169d8b864c8f9edc422c92d10128bd36d9c5c1ab162?d=identicon)[aboustayyef](/maintainers/aboustayyef)

---

Top Contributors

[![mattwright](https://avatars.githubusercontent.com/u/500715?v=4)](https://github.com/mattwright "mattwright (11 commits)")[![toddlevy](https://avatars.githubusercontent.com/u/1772881?v=4)](https://github.com/toddlevy "toddlevy (3 commits)")[![aboustayyef](https://avatars.githubusercontent.com/u/1009406?v=4)](https://github.com/aboustayyef "aboustayyef (2 commits)")[![cfreeh](https://avatars.githubusercontent.com/u/1627764?v=4)](https://github.com/cfreeh "cfreeh (1 commits)")

### Embed Badge

![Health badge](/badges/aboustayyef-url-resolver/health.svg)

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

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78026.4M414](/packages/react-http)[php-http/curl-client

PSR-18 and HTTPlug Async client with cURL

48347.0M384](/packages/php-http-curl-client)[smi2/phpclickhouse

PHP ClickHouse Client

84310.1M71](/packages/smi2-phpclickhouse)

PHPackages © 2026

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