Guest_imported
New member
- Jan 1, 1970
- 0
Hi!
I have small problem. I want to ping a server and the result shouldn't be printed in the browser window, just become a value.
Here you can see the script that I have:
<?
$command="ping linux.com -t ttl -c1 | tail -1 | awk '{print $4 \" \" $5}'";
$output = system($command);
system("exit(0)"
echo "DATA: $output";
?>
When I run this in my browser the resualt will be as follow:
33.1/33.1/33.1 ms DATA: 33.1/33.1/33.1 ms
The echo value is just a test for me to see if the $output value is OK.
What I want is that the value before DATA: 33.1/33.1/33.1 ms
shouldn't be viewed in the browser just DATA: 33.1/33.1/33.1 ms
Could someone please help me with this problem?
Best Regards
Peter Håkansson
I have small problem. I want to ping a server and the result shouldn't be printed in the browser window, just become a value.
Here you can see the script that I have:
<?
$command="ping linux.com -t ttl -c1 | tail -1 | awk '{print $4 \" \" $5}'";
$output = system($command);
system("exit(0)"
echo "DATA: $output";
?>
When I run this in my browser the resualt will be as follow:
33.1/33.1/33.1 ms DATA: 33.1/33.1/33.1 ms
The echo value is just a test for me to see if the $output value is OK.
What I want is that the value before DATA: 33.1/33.1/33.1 ms
shouldn't be viewed in the browser just DATA: 33.1/33.1/33.1 ms
Could someone please help me with this problem?
Best Regards
Peter Håkansson