|
|
|
| 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 : |
4776 |
| 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>
|
|
| Accepts a database & hostname from a user and then HTTP username and password. Uses this to connect to a MySQL database. Produces a form based on the tables it finds there to allow the user to do SELECTs, INSERTs, and DELETEs. Categories : Databases, PHP, MySQL, Complete Programs | | | phpAds, a complete banner and ad management system with detailled tracking and stats. Categories : MySQL, Complete Programs, Ecommerce, PHP, Databases | | | Point and Click Interface ala MS Access for creating SQL statements. Categories : MySQL, Complete Programs, General SQL, PHP, Databases | | | Searches through a local INN server's discussions Categories : Search, Complete Programs, PHP | | | Parses HTTP_USER_AGENT so that you can customize your site to different browsers Categories : HTML, PHP, Complete Programs | | | File Explorer, browse, upload, download and edit your web site files with only a browser and a HTTP connection. Categories : Complete Programs, Content Management, Filesystem, PHP | | | PHPCatalog Categories : Ecommerce, PHP, Complete Programs | | | GuestBook Light - a plug and play application for any website. Categories : PHP, Complete Programs, Filesystem, Sessions | | | A set of functions sitting on top of the abstraction layer that makes it a little easier to do SQL stuff. Documentation is within Categories : Databases, ODBC, Complete Programs, PHP | | | fforum fumanchi forum MySQL treestructure Categories : Complete Programs, PHP, MySQL | | | A simple and fast calendar combining PHP and tables. Use this as a base for applications in which a calendar is needed. Categories : Date Time, PHP, Complete Programs, Calendar | | | Builds JavaScript that updates the contents of one selector based on another. Categories : HTML, Java Script, PHP, Complete Programs, General | | | This is a script that list all image files on a given directory, and displays
the thumbnails nicely formated within an HTML table. It also make use of
JavScript to open pop up windows when the users want to see the full photo. Categories : Graphics, PHP, Complete Programs, Java Script | | | Browse a MySQL database & draw a tree view & load final items into a template page. Categories : MySQL, Complete Programs, Algorithms, PHP, Databases | | | Look for the *position* of the first occurence of string2
in string1, beginning at position start.
Categories : Complete Programs, PHP, Strings | |
|
|
|