Php > Complete Programs
This example uses the ps -aux command to display a list of all active processes
This example uses the ps -aux command to display a list of all active processes on the server
Processes On The Systemt
/* * Execute the ps -aux command */ exec("ps -aux", $pslist); /* * Plough through all lines */ for($i=0; $i < count($pslist); $i++) { /* * Make sure each word is seperated by one space */ $pslist[$i] = ereg_replace(" +"," ",$pslist[$i]); /* * Seperate the elements up */ $item[0] = strtok($pslist[$i]," "); for($s=1 ; $s < 11; $s++) { $item[$s] = strtok(" "); } /* * Now display them */ echo "
\n"; for($p=0; $p < 11; $p++) { echo "
$item[$p]
\n"; } echo "
\n"; } ?>
Php Codes
Algorithms
Arrays
Authentication
Calendar
Code Snippets
Programs
Content Manage
Contest Related
Cookies
Credit Cards
DBase Related
Databases
Date Time
Directories
E-Mail
Errors
File
File System
Forms
Handling
Graphics
HTML and PHP
Informix
Ingres
InterBase
LDAP
Look and Feel
Miscellaneous
MySQL
Other
PHP Classes
Searching
Navigation
Statistics
Strings
User Manage