All Projects → h4cc → multipart

h4cc / multipart

Licence: MIT license
A PHP library for parsing (and generating) RFC1341 Multipart.

Programming Languages

PHP
23972 projects - #3 most used programming language

h4cc/multipart

Build Status

A PHP library for parsing (and generating) RFC1341 Multipart.

Finally a Multipart parser library for PHP!

Usage

$content = '--------------------------eb2d2b296b73a011' . "\r\n"
    . 'Content-Disposition: form-data; name="foo"' . "\r\n"
    . 'Content-Type: text/plain' . "\r\n\r\n"
    . 'bar' . "\r\n"
    . 'buz' . "\r\n"
    . '--------------------------eb2d2b296b73a011--' . "\r\n";
$contentType = 'multipart/form-data; boundary=a3d8fcba372c456a';

$parserSelector = new ParserSelector();
$parser = $parserSelector->getParserForContentType($contentType);
$multipart = $parser->parse($content);

var_dump($multipart);

Current Status

I needed a multipart parser, so a wrote one. If anybody would like to write a Generator, do so :)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].