Morning, Ordinarily, we don't parse that stuff, because the server communicates via CGI/FCGI or some other server specific interface (apache).
The CLI server does though, I'd look there for inspiration ... there's also an HTTP parser included in there ... Cheers Joe On Wed, Nov 16, 2016 at 10:50 AM, Aaron Lewis <the.warl0ck.1...@gmail.com> wrote: > I have a file that contains a HTTP request, > > ``` > GET /xxx.php > Host: xxx > Content-Type: xxx > ... > ``` > > I would like to ask PHP cli to parse the HTTP request from a file, and > setup $_FILES, $_POST, $_SERVER etc. > What should I do? I'm familiar with PHP extensions, so I'm capable of > modifying SAPI myself. > > So far I've found sapi_post_entry, but I couldn't get the whole > picture. Where's the entry point of request parsing? > > > -- > Best Regards, > Aaron Lewis - PGP: 0x13714D33 - http://pgp.mit.edu/ > Finger Print: 9F67 391B B770 8FF6 99DC D92D 87F6 2602 1371 4D33 > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >