Amos Jeffries wrote:
echo and print in PHP and perl IIRC operate slightly differently.
I have found echo "blah\n"; flush(); both to be needed for PHP for
timely results.
The earlier mail was about perl print having an implicit \n already.
echo in PHP does not.
Amos
Whoops. The difference in the two scripts is the Perl one was rewriting
the string passed to it (which already had a newline at the end) and the
PHP script was outputting a completely new string. The PHP script
should probably look like:
#!/usr/bin/php
<?php
while ( fgets(STDIN) ) {
echo "302:http://www.yahoo.fr/\n";
flush;
}
?>
Chris