finger script?
| From: | Kurth Bemis | Date: | Wed, 29 Nov 2000 22:21:32 +0000 |
| Subject: | finger script? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-27896@lists.php.net to get a copy of this message | ||
hey all - i'm looking for a finger script that hides the last logged in from addy. like this
On since Tue Nov 28 11:10 (EST) on pts/0 from (hidden)
21 hours 18 minutes idle
i hacked a 20 second script together...and it get it to display all the finger info....but i want to hide the last logged from field....as above....i thought of substr to then have it crop the 50 or so chars to hide it...but there has to be a better way...ideas?
<?php
$runext = exec("/usr/bin/finger $name", $output, $error);
while (list(,$line)=each($output)) $run.=$line."\n";
print "<pre>$run</pre>";
?>
~kurth
Kurth Bemis - Network/Systems Administrator, USAExpress.net/Ozone Computer
Passwords are like underwear. You don't share them, you don't hang them on your monitor, or under your keyboard, you don't email them, or put them on a web site, and you must change them very often. --Seen in sig.
kurth@usaexpress.net | http://www.usaexpress.net/kurth
PGP key available - http://www.usaexpress.net/kurth/pgp
Fight Weak Encryption! Donate your wasted CPU cycles to Distributed.net (http://www.distributed.net)