|
Posted by Stelios G. Sfakianakis on 09/08/05 14:27
Hello,
I am using php 4.2.2 in Red Hat 9.0 with apache 2.0.40 I try to build a
php script that accepts POST requests that contain multimedia data and
shoves them in a MySQL database. My problem is that it seems that I
cannot read the POST data from stdin.
I created the following php script to test it:
<?php
$in = fopen("php://stdin", "rb");
$line = fread($in, 10);
echo "Content-type: text/plain\n\n";
echo "len=".strlen($line)." OK\n";
?>
and however I try to POST a file either with cURL (curl --data-binary
@file http://....) or with netcat (nc host port, ...) what I get back is
len=0 OK
i.e. no data are read!
Any ideas?
Thanks!
Navigation:
[Reply to this message]
|