-
ping with php
Hello,
I want to check of some local servers on my network are on-line and therefore I want to use the ping function.
I have tried several commands like:
$str = exec("ping -w 5 192.168.1.100", $input, $result);
but when I print $result I only see the first line like:
PING 192.168.1.100 (192.168.1.100): 56 data bytes )
but I don't see the result of the ping action.
The script is not waiting for the result of the ping action. When I do the same with f.i. ls command, I see the right reaction.
The linux system running is apache 2.2.14
Can anybody give me a hint what I have to do?
Greetings, Frans
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks