I want to do something like this:
$ [mysql query that produces many lines] | php parse_STDIN.php
In parse_STDIN.php file I want to be able to parse my data line by line from stdin.
parse_STDIN.php
use STDIN constant as file handler.
STDIN
while($f = fgets(STDIN)){ echo "line: $f"; }
Note: fgets on STDIN reads the character.
1.4m articles
1.4m replys
5 comments
57.0k users