I believe I resolved it. At least I'm now getting the results I want. And $buffer[0] contains each entire single line including the '\n'. The fscanf() looks like this now:
<?php
$fifo_file = "/tmp/php-alert.pipe";
$fp = fopen($fifo_file, "r");
$buffer = fscanf($fp, "%[^\t*]\n");
?>
Please correct me if I'm worng, but I think the "%[\t*]" means any number of tabs. Which accorrding to the manual includes a single whitespace.
Thanks.