Download the PHP package blobfolio/blob-mimes without Composer

On this page you can find all versions of the php package blobfolio/blob-mimes. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package blob-mimes

blob-mimes

DEPRECATED: This project is no longer actively maintained. Please see Righteous MIMEs instead.

A comprehensive MIME and file extension tool for PHP. Finally!

 

Table of Contents

  1. Features
  2. Requirements
  3. Installation
  4. Reference
    • check_ext_and_mime()
    • finfo()
    • get_extension()
    • get_extensions()
    • get_mime()
    • get_mimes()
  5. License

 

Features

It should be simple, but MIME types and file extensions are wildly inconsistent. Attempting to derive and/or correct that information when, e.g. verifying a file upload, is a nightmare in any programming language.

blob-mimes is a PHP library with a comprehensive MIME/ext database and simple helpers to access that information in a variety of ways:

The database is compiled from the following sources:

 

Requirements

blob-mimes requires PHP 7.0+ with the following modules:

UTF-8 is used for all string encoding. This could create conflicts on environments using something else.

The build script additionally requires cURL.

 

Installation

Install via Composer:

 

Reference

check_ext_and_mime()

Verify that a file extension and MIME type belong together. Because technology is always evolving and the MIME standard is always changing, this will consider some/thing and some/x-thing equivalent.

Arguments

Returns

Returns TRUE or FALSE.

Example

 

finfo()

Pull path and type information for a file, using its name and/or content. If it is determined that the file is incorrectly named, alternative names with the correct file extension(s) are suggested.

Arguments

Returns

Returns all file information that can be derived according to the format below.

Example

 

get_extension()

Retrieve information about a file extension.

Arguments

Returns

Returns the information or FALSE. Note: The first MIME entry will always be the official (or most conventional) media type.

 

get_extensions()

Retrieve information about all known file extensions.

Arguments

N/A

Returns

Returns a MIME database organized by extension.

 

get_mime()

Retrieve information about a MIME type.

Arguments

Returns

Returns the information or FALSE.

Example

 

get_mimes()

Retrieve information about all known MIME types.

Arguments

N/A

Returns

Returns a MIME database organized by type. Note: The first extension should be the most common for the type.

 

License

Copyright © 2018 Blobfolio, LLC <[email protected]>

This work is free. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004

Copyright (C) 2004 Sam Hocevar <[email protected]>

Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. You just DO WHAT THE FUCK YOU WANT TO.

Donations

Bitcoin QR If you have found this work useful and would like to contribute financially, Bitcoin tips are always welcome!

1Af56Nxauv8M1ChyQxtBe1yvdp2jtaB1GF

All versions of blob-mimes with dependencies

PHP Build Version
Package Version
Requires php Version >= 7.0
ext-filter Version *
ext-dom Version *
ext-mbstring Version *
ext-json Version *
ext-bcmath Version *
ext-hash Version *
blobfolio/blob-common Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package blobfolio/blob-mimes contains the following files

Loading the files please wait ....