shanept/mime-sniffer

Sniffs the MIME type of many common types of files.

Installs: 1 795

Dependents: 0

Suggesters: 0

Security: 0

Stars: 5

Watchers: 2

Forks: 3

Open Issues: 0

pkg:composer/shanept/mime-sniffer

2.0.1 2023-06-12 17:37 UTC

This package is auto-updated.

Last update: 2026-01-12 23:12:10 UTC


README

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

What's 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?

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

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

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