Capturing xforms standard input via PHP?

  • Follow


I'm working with a JavaScript implementation of Xforms (FormFaces) and
am trying to capture the standard input of a submit via a POST method
(XML data).  I've found I can capture the standard input with a shell
script but not with a PHP script.  I've tried to capture the standard
input with both the system command ( cat >file ) and using fopen/fwrite
but neither technique works (I can run my PHP script from command line
fine).

My server is Linux running Apache 1.3.34 with PHP 4.4.2.  My question
is whether I should be able to do this with PHP or whether this is an
Apache configuration issue for my server.  Anyone know?

If this is not possible, my work around is to use a shell script to
capture stdin to a file and then invoke a PHP program to do the rest of
the processing but I'd rather avoid the kludge if possible.

Denis

0
Reply sysdrk (9) 6/5/2006 10:09:55 PM

On 2006-06-05, Denis <sysdrk@wowway.com> wrote:
> I'm working with a JavaScript implementation of Xforms (FormFaces) and
> am trying to capture the standard input of a submit via a POST method
> (XML data).  I've found I can capture the standard input with a shell
> script but not with a PHP script.  I've tried to capture the standard
> input with both the system command ( cat >file ) and using fopen/fwrite
> but neither technique works (I can run my PHP script from command line
> fine).

The last time i tried to gather (unmodified) XML data that was posted i
did it with $input = file_get_contents('php://input'); 

-- 
Met vriendelijke groeten,
Tim Van Wassenhove <http://timvw.madoka.be>
0
Reply timvw (192) 6/6/2006 5:09:04 AM


Tim Van Wassenhove wrote:
>
> The last time i tried to gather (unmodified) XML data that was posted i
> did it with $input = file_get_contents('php://input');

Great - this works.  The "secret" is using php://input rather than
php://stdin.  Thanks!

Denis

0
Reply sysdrk (9) 6/6/2006 5:02:57 PM

2 Replies
29 Views

(page loaded in 0.085 seconds)

Similiar Articles:








7/23/2012 4:39:53 AM


Reply: