|
|
|
| Title : |
who.php3 - prints a summary of the current activity on the system, including what each user is doing and where they are logged if from.
PHP3 functions: exec, ereg
System: IRIX 6.3 |
| Categories : |
Complete Programs, PHP |
 Jeff Schmitt |
| Date : |
Apr 08th 1998 |
| Grade : |
1 of 5 (graded 1 times) |
| Viewed : |
5648 |
| File : |
No file for this code example. |
| Images : |
No Images for this code example. |
|
| Search : |
More code by Jeff Schmitt |
|
| Action : |
Grade This Code Example
|
|
| Tools : |
My Examples List |
|
|
|
|
|
|
<html><head><title>WHO PHP Example</title></head>
<body>
<center><h1>WHO PHP Example</h1></center>
<center>
<table border=2>
<tr><th>User</th><th>From</th><th>Since</th><th>Command</th>
<?
//
// who.php3
// by Jeff Schmitt
// http://www,towson.edu/~schmitt
// schmitt@towson.edu
// March, 1998
//
exec("w -hW", $list);
for ($i=0;$i < count($list);$i+=2) {
if (!ereg("(.{8}) .{8} (.{9}).{20}(.*)", $list[$i], $regs)) {
echo "<tr><td>Error";
} else {
echo "<tr><td align=\"center\">";
echo $regs[1];
echo "</td><td align=\"center\">";
echo $list[$i+1];
echo "</td><td align=\"center\">";
echo $regs[2];
echo "</td><td align=\"center\">";
echo $regs[3];
echo "</td></tr>";
}
}
?>
</table>
</center>
</body></html>
|
|
| free, search engine, indexing, system, information, web,
ftp, http, free, software, cgi, php, MySQL, database, php3,
FreeBSD, Linux, Unix, UdmSearch Categories : MySQL, Complete Programs, PHP, Databases, Search | | | A database abstraction layer for the PHP 3.0 ODBC module. It supports persistent connections, fetching rows into arrays, prepare/execute (variable binding) and has a new and improved error interface. Categories : Databases, PHP, Complete Programs | | | ClassFuncDoc - This script is a classes and functions documentation tool. Categories : PHP, Classes and Objects, Documentation, PHP Classes, Complete Programs | | | Free For All Links Page using PHP3 and Mysql Categories : PHP, MySQL, Complete Programs | | | phpCards - PHP/mySQL postcard script with web based admin to add, edit, and delete cards and categories. Very easy to install. Categories : PHP, Complete Programs, HTML and PHP, MySQL | | | Disk Usage, uses UNIX du command. Categories : Complete Programs, PHP, Filesystem | | | phpEasyMail: An easy way to send data from HTML-forms via EMail. Categories : Email, HTML and PHP, Complete Programs, PHP | | | Tropicalm Genetree Family (MySQL based family tree) Categories : PHP, Interfaces, Databases, MySQL, Complete Programs | | | fforum fumanchi forum MySQL treestructure Categories : Complete Programs, PHP, MySQL | | | Validator 98 - a PHP-script to generate form-validation-code in JavaScript. Categories : Complete Programs, Java Script, PHP, HTML and PHP | | | AITSH Statistics Categories : Complete Programs, Databases, HTML and PHP, Sessions, PHP | | | PHP Domain Availability Checker Categories : PHP, Complete Programs, Regexps, HTTP, Sockets | | | complete, simple, working example of a login screen/system using php functions, cookies, and a mysql database for begginers. Categories : Authentication, Complete Programs, PHP, MySQL, Databases | | | BBS system for easy customization. Utilizes mySQL. Categories : Complete Programs, MySQL, PHP, Databases | | | AITSH Mail Categories : Complete Programs, Email, PHP | |
| |
| |
|