Hey all I realize I should be learning this on my own but I'm hoping to get a little jump start help from someone... I have server monitoring setup but have been trying to make a little graphical web page of my own.
So I've started using this php-pear module called Net_Ping. using a webpage like the following...
// include class
// create object
$ping = Net_Ping::factory();
// ping host and display response
$response = $ping->ping('www.google.com');
It pings Google and then gives a response like the following
Net_Ping_Result Object ( [_icmp_sequence] => Array (  => 79.8  => 79.8  => 80 ) [_target_ip] => 22.214.171.124 [_bytes_per_request] => 64 [_bytes_total] => 192 [_ttl] => 54 [_raw_data] => Array (  => PING www.l.google.com (126.96.36.199) 56(84) bytes of data.  => 64 bytes from qy-in-f105.1e100.net (188.8.131.52): icmp_seq=1 ttl=54 time=79.8 ms  => 64 bytes from qy-in-f105.1e100.net (184.108.40.206): icmp_seq=2 ttl=54 time=79.8 ms  => 64 bytes from qy-in-f105.1e100.net (220.127.116.11): icmp_seq=3 ttl=54 time=80.0 ms  =>  => --- www.l.google.com ping statistics ---  => 3 packets transmitted, 3 received, 0% packet loss, time 1999ms  => rtt min/avg/max/mdev = 79.805/79.903/80.066/0.258 ms ) [_sysname] => linux [_round_trip] => Array ( [min] => 79.805 [avg] => 79.903 [max] => 80.066 [stddev] => 0.258 ) [_transmitted] => 3 [_received] => 3 [_loss] => 0 )
So my plan is to have an image displaying for when the target is able to be pinged. And when it has a loss or can not be reached for a certain time or amount of lost packets then I would like it to display a different image. You know, just the normal Green up - Red down type thing.
The other monitors do this but I can't make them display in a webpage the way I want to go up on our 42" monitor I have at work.
So how do I have PHP read the returned information and then do something according... You don't have to give me the code but if you could at least point me in the right direction of something to read. A small code snippet/sample would be great too but like I said not necessary. I'm hoping to have this run multiple targets on one page but I'm guessing it won't be hard I'll just have to run multiple instances of hte code on the same page and then just position each response how I want on the page.
Thanks again in advance!!