<?php
function apacheProccesses() {
	if (!(strpos(PHP_OS, 'WIN') === false))
	die('Sorry. This function designed for Linux servers.');
	ob_start();
	system('ps -ef|grep httpd');
	return count(explode("\n",ob_get_clean()))-1;
}
?>
Published in: PHP
Download

Related snippets