PHPackages                             chenalon/referer-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. chenalon/referer-parser

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

chenalon/referer-parser
=======================

Fork of Snowplow Refer(r)er parser for PHP

1.0.1(7y ago)017MITPHPPHP ^7.0

Since Feb 1Pushed 7y ago1 watchersCompare

[ Source](https://github.com/ChenAlon/referer-parser)[ Packagist](https://packagist.org/packages/chenalon/referer-parser)[ RSS](/packages/chenalon-referer-parser/feed)WikiDiscussions develop Synced 2mo ago

READMEChangelogDependencies (2)Versions (6)Used By (0)

> **NOTE**: Fork of [Snowplow Referer Parser](https://github.com/snowplow-referer-parser/referer-parser)

referer-parser
==============

[](#referer-parser)

referer-parser is a database for extracting marketing attribution data (such as search terms) from referer URLs, inspired by the [ua-parser](https://github.com/tobie/ua-parser) project (an equivalent library for user agent parsing).

The referer-parser project also contains multiple libraries for working with the referer-parser database in different languages.

referer-parser is a core component of [Snowplow](https://github.com/snowplow/snowplow), the open-source web-scale analytics platform powered by Hadoop and Redshift.

*Note that we always use the original HTTP misspelling of 'referer' (and thus 'referal') in this project - never 'referrer'.*

Database
--------

[](#database)

The latest database is always available on this URL:

The database is updated at most once a month. Each new version of the database is also uploaded with a timestamp:

If there is an issue with the database necessitating a re-release within the month, the corresponding files will be overwritten.

Maintainers
-----------

[](#maintainers)

- PHP: [Lars Strojny](https://github.com/lstrojny)
- `referers.yml`: [Snowplow Analytics](http://snowplowanalytics.com)

Usage
-----

[](#usage)

The PHP version of this library uses the updated API, and identifies search, social, webmail, internal and unknown referers:

```
use Snowplow\RefererParser\Parser;

$parser = new Parser();
$referer = $parser->parse(
    'http://www.google.com/search?q=gateway+oracle+cards+denise+linn&hl=en&client=safari',
    'http://www.psychicbazaar.com/shop'
);

if ($referer->isKnown()) {
    echo $referer->getMedium(); // "Search"
    echo $referer->getSource(); // "Google"
    echo $referer->getSearchTerm();   // "gateway oracle cards denise linn"
}
```

For more information, please see the PHP [README](https://github.com/snowplow/referer-parser/blob/master/php/README.md).

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

[](#contributing)

We welcome contributions to referer-parser:

1. **New search engines and other referers** - if you notice a search engine, social network or other site missing from `referers.yml`, please fork the repo, add the missing entry and submit a pull request
2. **Ports of referer-parser to other languages** - we welcome ports of referer-parser to new programming languages (e.g. Lua, Go, Haskell, C)
3. **Bug fixes, feature requests etc** - much appreciated!

**Please sign the [Snowplow CLA](https://github.com/snowplow/snowplow/wiki/CLA) before making pull requests.**

Support
-------

[](#support)

General support for referer-parser is handled by the team at Snowplow Analytics Ltd.

You can contact the Snowplow Analytics team through any of the [channels listed on their wiki](https://github.com/snowplow/snowplow/wiki/Talk-to-us).

Copyright and license
---------------------

[](#copyright-and-license)

`referers.yml` is based on [Piwik's](http://piwik.org) [`SearchEngines.php`](https://github.com/piwik/piwik/blob/master/core/DataFiles/SearchEngines.php) and [`Socials.php`](https://github.com/piwik/piwik/blob/master/core/DataFiles/Socials.php), copyright 2012 Matthieu Aubry and available under the [GNU General Public License v3](http://www.gnu.org/licenses/gpl-3.0.html).

The PHP port is copyright 2013-2014 [Lars Strojny](https://github.com/lstrojny) and is available under the [MIT License](http://opensource.org/licenses/MIT).

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 62% 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 ~474 days

Total

4

Last Release

2697d ago

Major Versions

0.2.0 → 1.0.02018-12-25

### Community

Maintainers

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

---

Top Contributors

[![alexanderdean](https://avatars.githubusercontent.com/u/200511?v=4)](https://github.com/alexanderdean "alexanderdean (284 commits)")[![fblundun](https://avatars.githubusercontent.com/u/5892914?v=4)](https://github.com/fblundun "fblundun (42 commits)")[![donspaulding](https://avatars.githubusercontent.com/u/7777?v=4)](https://github.com/donspaulding "donspaulding (28 commits)")[![lstrojny](https://avatars.githubusercontent.com/u/79707?v=4)](https://github.com/lstrojny "lstrojny (20 commits)")[![tsileo](https://avatars.githubusercontent.com/u/395031?v=4)](https://github.com/tsileo "tsileo (15 commits)")[![mkatrenik](https://avatars.githubusercontent.com/u/887117?v=4)](https://github.com/mkatrenik "mkatrenik (11 commits)")[![swijnands](https://avatars.githubusercontent.com/u/1218969?v=4)](https://github.com/swijnands "swijnands (11 commits)")[![ChenAlon](https://avatars.githubusercontent.com/u/4798088?v=4)](https://github.com/ChenAlon "ChenAlon (7 commits)")[![235](https://avatars.githubusercontent.com/u/649444?v=4)](https://github.com/235 "235 (5 commits)")[![jhirbour](https://avatars.githubusercontent.com/u/2355?v=4)](https://github.com/jhirbour "jhirbour (4 commits)")[![kingo55](https://avatars.githubusercontent.com/u/2361388?v=4)](https://github.com/kingo55 "kingo55 (3 commits)")[![Tombar](https://avatars.githubusercontent.com/u/141697?v=4)](https://github.com/Tombar "Tombar (3 commits)")[![emilssolmanis](https://avatars.githubusercontent.com/u/663720?v=4)](https://github.com/emilssolmanis "emilssolmanis (3 commits)")[![EyePulp](https://avatars.githubusercontent.com/u/231081?v=4)](https://github.com/EyePulp "EyePulp (2 commits)")[![danm](https://avatars.githubusercontent.com/u/6394846?v=4)](https://github.com/danm "danm (2 commits)")[![tiborb](https://avatars.githubusercontent.com/u/3955068?v=4)](https://github.com/tiborb "tiborb (2 commits)")[![BenFradet](https://avatars.githubusercontent.com/u/1737211?v=4)](https://github.com/BenFradet "BenFradet (2 commits)")[![ygzgxyz](https://avatars.githubusercontent.com/u/249795?v=4)](https://github.com/ygzgxyz "ygzgxyz (2 commits)")[![ramin](https://avatars.githubusercontent.com/u/12677?v=4)](https://github.com/ramin "ramin (1 commits)")[![rgraff](https://avatars.githubusercontent.com/u/8323?v=4)](https://github.com/rgraff "rgraff (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/chenalon-referer-parser/health.svg)

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

###  Alternatives

[hcodes/server_yametrika

Server-side tracking of visitors using Yandex.Metrica

7220.2k](/packages/hcodes-server-yametrika)[axllent/silverstripe-trailing-slash

Ensure that a single trailing slash is always added to the URL

11182.6k5](/packages/axllent-silverstripe-trailing-slash)

PHPackages © 2026

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