Re: reading http request raw data as stream



Janwillem Borleffs wrote:
AviCoh@xxxxxxxxx wrote:
Also, I use the nice stream wrapper 'php://input' in order to read the
posted binary contents, and again here I notice that the control is
passed to PHP only after the entire request had reached the server.


A possibility would be to set up a PHP-based (telnet) server, which listens
to a port ignored by Apache.

http://www.devshed.com/c/a/PHP/Socket-Programming-With-PHP/


JW

Thanks, JW.
However, I'm afraid it's not a viable (yet original :-D ) option for me
due to three reasons:
1. my hosting provider does not allow any incoming socket operations
(outgoing using curl via proxy only)
2. I wouldn't wanna go with any other port rather than 80 in order not
to have to deal with FW issues on the client side
3. I like what I get from Apache+PHP and wouldn't want to implement a
mini web server inside my app.

It just seems logical to me that PHP would support such a flow (like
perl or java for instance).

I have tried playing with some php.ini parameters :
changed the post_max_size to 0, and was able to receive the entire file
contents without having to wait for the request to finish.
The downside was that PHP kept screaming on that it had received a
request with a body bigger than the post_max_size....

Best,
Avi

.



Relevant Pages

  • Re: No inbound email from external domains -- please help!
    ... Was not particularly pointing at you with the comment about disclosing the info needed, but you would be amazed at what gets XXXXX'd out when people request help in this space. ... except for the error that the tool cannot reach your mail server. ... My guess is that your router took a hit. ... verify that the wan facing nic and the inside port on the router are still in the same subnet. ...
    (microsoft.public.windows.server.sbs)
  • Re: How to do a Pick/DataBASIC http server service?
    ... use a forwarding technique which accepts the request then redirects it ... And that request to the other server might or might not also be ... Web Services - which is one of the reasons why I wrote my articles ont ... Yes, but is there even one example of PHP with UniData and, if so, what ...
    (comp.databases.pick)
  • serverside javascript - translation to PHP
    ... I am working on application that will contain a shared portion running ... on server and client and would like to be able to deploy on LAMP. ... J4P5 - it comes with parser and runtime (in PHP). ... My code will not run with every HTTP request but only with final ...
    (comp.lang.javascript)
  • Re: BBC TV 4 - Hawkwind: Do not panic
    ... request for a Web page over port 80 to a server. ... makes an entry that the web browser sent a request out on a certain ...
    (uk.comp.sys.mac)
  • Re: BBC TV 4 - Hawkwind: Do not panic
    ... request for a Web page over port 80 to a server. ... makes an entry that the web browser sent a request out on a certain ...
    (uk.comp.sys.mac)