-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample.php
More file actions
executable file
·26 lines (19 loc) · 914 Bytes
/
example.php
File metadata and controls
executable file
·26 lines (19 loc) · 914 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
/****************************************************************************************************
This example demonstrates the use of the ProcessList class.
It works the same way for both Windows and Unix platforms.
****************************************************************************************************/
// This package requires the Wmi package for Windows platforms :
// http://www.phpclasses.org/package/10001-PHP-Provides-access-to-Windows-WMI.html
// A version of this package is provided here for convenience, but it may not be the latest release.
require_once ( 'Wmi.phpclass' ) ;
require_once ( 'ProcessList.phpclass' ) ;
if ( php_sapi_name ( ) != 'cli' )
echo ( "<pre>" ) ;
// Get the process list and print it
$ps = new ProcessList ( ) ;
foreach ( $ps as $process )
{
print_r ( $process ) ;
echo ( "\n" ) ;
}