Hey Raiz, I gots two questions for ya.
1) You use linux with apache by chance? If so... Any idea how to filter what apache2 writes to access.log ? I'm having a heck of a time figurign that out.
and
2) Do you know the pro's and con's of exec() vs shell_exec()?
I get the same results using the following two snippets of code and wonder if one is better than the other. Maybe less work for server, or maybe other doesn't close the command properly, or whatever:
Code:
$output = shell_exec('tail -15 /var/log/apache2/access.log');
echo $output;
and..
Code:
$cmd = "tail -15 /var/log/apache2/access.log";
exec("$cmd", $output);
foreach($output as $outputline) {
echo ("$outputline\n");
}
-----signature-----
Every forum should have a Phases.
Bringing SSP back to life at
http://www.superstickphase.com !
Retired AC/AC2 - Phases Og'Maxim - Leafcull