K
K-Disk.com
Guest
Hello All,
I am trying to make a PHP Script to automate a few routine checks I do to one of my linux servers. Here is my problem.
I worte this script
<?php
system ("netstat -an |grep :80 |wc -l");
?>
However it is returning a value of 0 even when there are tons of users on. When I run this command in PUTTY it works fine, What am I doing wrong?
It still does not work
<?php
$output = shell_exec ("netstat -an |grep :80 |wc -l");
echo $output;
?>
$output returns a value of 0
I am trying to make a PHP Script to automate a few routine checks I do to one of my linux servers. Here is my problem.
I worte this script
<?php
system ("netstat -an |grep :80 |wc -l");
?>
However it is returning a value of 0 even when there are tons of users on. When I run this command in PUTTY it works fine, What am I doing wrong?
It still does not work
<?php
$output = shell_exec ("netstat -an |grep :80 |wc -l");
echo $output;
?>
$output returns a value of 0