Re: Help parsing text file?
| From: | David Robley | Date: | Fri, 09 Jan 2004 04:54:44 +0000 |
| Subject: | Re: Help parsing text file? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-174088@lists.php.net to get a copy of this message | ||
In article
<4436BFAE5192004FAAC5B0C7273B3B2B03910B@exchange.advocacyinc.org>,
cwhitmore@Advocacyinc.org says...
> I'm very new to PHP.
> I want to display /var/log/lastlog with php on a webpage, but I need
> some help. How do I do that?
> Looking at the docs it looks like file() would work, but I couldn't get
> it to display the file.
> Carlton.
>
>
>
lastlog isn't actually a text file. You'ld need to use the lastlog program
to parse it for you and then output the result.
Having said that, I wonder if you are really looking for the output of
last (driven from wtmp) which will give you a complete login history,
rather than the info available from lastlog?
Cheers
--
Quod subigo farinam
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?