h4cc / multipart
A PHP library for parsing and generating RFC1341 Multipart.
Installs: 106 218
Dependents: 3
Suggesters: 0
Security: 0
Stars: 14
Watchers: 6
Forks: 2
Open Issues: 3
Requires (Dev)
- phpunit/phpunit: ~4.0
This package is not auto-updated.
Last update: 2024-11-05 04:13:09 UTC
README
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 :)