On 11 Dec 2009, at 8:41, Ryan Fitzer wrote: > $fstat = fstat(STDIN); > $stdin = fread(STDIN, $fstat['size']); I am surprised this works. STDIN is a pipe and can’t be stat’ed for file size. I would suggest instead using file_get_contents("php://stdin").