Can any one tell me why this script is only pulling the first line of data from the file?
<?php
$file="/var/log/syslog";
$fp=fopen($file, "r");
$content=fread($fp, filesize($file));
$content=explode(" ", $content);
for($i=0;$i<count($content);$i++){
print("$content[0] $content[1] $content[2] $content[7] $content[8] $content[9] $content[16] $content[17]<br>");
}
fclose($fp);
?>
I can't figure it out, it works great but it only gets the first line and repeats it forever.
Thanks,
Ben