PHPackages                             pagemill/accept - 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. pagemill/accept

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

pagemill/accept
===============

Parses the HTTP Accept header and determes the preferred content type

v3.0.0(9mo ago)117.7k↓66.5%3BSD-3-ClausePHPPHP ^8.2CI failing

Since Jul 26Pushed 9mo ago5 watchersCompare

[ Source](https://github.com/dealnews/pagemill-accept)[ Packagist](https://packagist.org/packages/pagemill/accept)[ RSS](/packages/pagemill-accept/feed)WikiDiscussions master Synced yesterday

READMEChangelog (4)Dependencies (2)Versions (7)Used By (3)

HTTP Accept Header Parser
=========================

[](#http-accept-header-parser)

Parses an Accept header and determines which content type is preferred by the client according to [RFC 2616](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).

```
// content types with which the web service can respond
$valid_content_types = [
    "application/json",
    "text/xml"
];

$accept = new \PageMill\Accept\Accept();
$content_type = $accept->determine($valid_content_types);

// If Accept did not find an acceptable content type, the determine method
// will return null. The server should respond to the client with a 406.
if ($content_type === null) {
    // Respond with 406 Not Acceptable
    http_response_code(406);
    exit();
}
```

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance55

Moderate activity, may be stable

Popularity28

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~745 days

Total

4

Last Release

296d ago

Major Versions

v1.0 → v2.0.02020-03-22

v2.0.1 → v3.0.02025-09-09

PHP version history (3 changes)v2.0.0PHP ~7.3

v2.0.1PHP ^7.4 || ^8.0

v3.0.0PHP ^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/49531?v=4)[Brian Moon](/maintainers/brianlmoon)[@brianlmoon](https://github.com/brianlmoon)

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

---

Top Contributors

[![brianlmoon](https://avatars.githubusercontent.com/u/49531?v=4)](https://github.com/brianlmoon "brianlmoon (10 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pagemill-accept/health.svg)

```
[![Health](https://phpackages.com/badges/pagemill-accept/health.svg)](https://phpackages.com/packages/pagemill-accept)
```

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25126.1M82](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.9M6.9k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k24.3k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87965.9k114](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.4M91](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69127.2k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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