Hi All
I've just had anti virus installed on my server. There is a log file that
shows all the viruses that have been trapped. There are lots of different
lines in the log file but the ones I'm interested in look like this:
/var/amavis/amavis-012184/parts/part-00002: Worm.SomeFool.B-petite FOUND
What I want to write a little PHP script that will display the results on a
web page. So, my first task will be to extract only the lines that begine
with /var/amavis, or even only those that end with FOUND.
Then I want to take all the characters between the : and the F and display
those.
It would be nice if I could display a count of how many viruses had been
caught so far.
Lastly, I really only want to display, say, 30 lines at a time.
Then I pop a refresh on the page and we can hopefully see the viruses as
they come in. It's just so I can show customers how clever this is.
I'm going to start digging myself through the PHP manual but if anyone could
offer any guidance I'd be most grateful. I think it might be explode that I
want to use, but I'm not sure. Nor am I sure how to select only the
relevant lines and just display the last 30.
Best
Andy
I've just had anti virus installed on my server. There is a log file that
shows all the viruses that have been trapped. There are lots of different
lines in the log file but the ones I'm interested in look like this:
/var/amavis/amavis-012184/parts/part-00002: Worm.SomeFool.B-petite FOUND
What I want to write a little PHP script that will display the results on a
web page. So, my first task will be to extract only the lines that begine
with /var/amavis, or even only those that end with FOUND.
Then I want to take all the characters between the : and the F and display
those.
It would be nice if I could display a count of how many viruses had been
caught so far.
Lastly, I really only want to display, say, 30 lines at a time.
Then I pop a refresh on the page and we can hopefully see the viruses as
they come in. It's just so I can show customers how clever this is.
I'm going to start digging myself through the PHP manual but if anyone could
offer any guidance I'd be most grateful. I think it might be explode that I
want to use, but I'm not sure. Nor am I sure how to select only the
relevant lines and just display the last 30.
Best
Andy
Comment