PHPackages                             shanept/mime-sniffer - 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. shanept/mime-sniffer

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

shanept/mime-sniffer
====================

Sniffs the MIME type of many common types of files.

2.0.1(2y ago)52.2k↓20.8%3MITPHP

Since Jan 20Pushed 2y ago2 watchersCompare

[ Source](https://github.com/shanept/MimeSniffer)[ Packagist](https://packagist.org/packages/shanept/mime-sniffer)[ RSS](/packages/shanept-mime-sniffer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (3)Used By (0)

MimeSniffer v2
--------------

[](#mimesniffer-v2)

This PHP class sniffs the MIME type of many common types of files.

What's new?
-----------

[](#whats-new)

Version 2 re-implements the API such that it more closely follows PSR-2. We have also purged those ugly tests and have started using PHPUnit and Composer.

How can I use it?
-----------------

[](#how-can-i-use-it)

This software is put in the public domain. Why? Because I can't be bothered chasing it everywhere. Call me lazy, eh.
So, I guess what my point is, is that you may use it however you like. Feel free to clone, modify, poke it, play around. Sell it. I don't mind.

For your convenience, it is available on packagist for use with composer. Just tell your code monkey to run the following:

```
composer require shanept/mime-sniffer

```

You may, of course, download the file and include it in your projects. But that'd be too easy! ;)

Contributions
-------------

[](#contributions)

All contributions are appreciated. Please, create a pull request!

Thank you, CoR, for #1, your input and kind words!

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~2700 days

Total

2

Last Release

1071d ago

### Community

Maintainers

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

---

Top Contributors

[![amattu2](https://avatars.githubusercontent.com/u/38357871?v=4)](https://github.com/amattu2 "amattu2 (1 commits)")[![shanept](https://avatars.githubusercontent.com/u/5936269?v=4)](https://github.com/shanept "shanept (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/shanept-mime-sniffer/health.svg)

```
[![Health](https://phpackages.com/badges/shanept-mime-sniffer/health.svg)](https://phpackages.com/packages/shanept-mime-sniffer)
```

PHPackages © 2026

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