Current location: Hot Scripts Forums » Programming Languages » PHP » dynamic image src = Newbie question


dynamic image src = Newbie question

Reply
  #1 (permalink)  
Old 10-06-03, 03:06 PM
clintre clintre is offline
Newbie Coder
 
Join Date: Aug 2003
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
dynamic image src = Newbie question

I have an IT inventory script that has a feature where it actually does a quick ping and returns an "up" or "down" image stating that systems status.

Basically I do this:


$cmd=shell_exec("ping -n 1 -w 1 $servername");
$dati_mount=explode(",",$cmd);
if (eregi ("1", $dati_mount[1], $out)) {$pingimg = "<img src='http://isweb.ksnet.com/images/server_inv/stat_up.gif' height=16' width='16' border='0' alt=''><br>";}
print {$pingimg = "<img src='http://isweb.ksnet.com/images/server_inv/stat_down.gif' height=16' width='16' border='0' alt=''><br>";}
echo $pingimg;

The problem is now that there is 100+ systems on the list it takes a little while for it to run through each ping in the "while" loops.

What I would like to do is have something where it calls a separate php file in each loop that returns the image without having to wait each ping to finish.

Basically keep going through the loops and have the image appear whenever the external script finishes. Is that even possible? Just want to check. Any other suggestions to speed this up?

Thanks for any help!!!
Reply With Quote
  #2 (permalink)  
Old 10-07-03, 09:56 AM
YourPHPPro's Avatar
YourPHPPro YourPHPPro is offline
Community VIP
 
Join Date: Aug 2003
Posts: 430
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by clintre
What I would like to do is have something where it calls a separate php file in each loop that returns the image without having to wait each ping to finish.
I think you might be more interested in something like Big Brother - as this is right up its alley:

Quote:
Big Brother monitors System and Network-delivered services for availability. Your current network status is displayed on a color-coded web page in near-real time. When problems are detected, you're immediately notified by e-mail, pager, or text messaging.
Site: http://www.bb4.com/
Demo: http://www.bb4.com/bb/

Also check out this 'review':

Mind the Ether with Network Monitors for Windows and Linux
http://networking.earthweb.com/netos...le.php/1015321
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Image help jacobe PHP 8 10-15-03 04:55 AM
camera phone image poster apt2 Script Requests 2 08-29-03 07:20 PM
A different kind of image counter Stix Script Requests 1 08-11-03 11:50 PM
MySQL with PHP question. HELP for a newbie kenfused PHP 3 08-02-03 12:53 AM
Newbie: Looking for a image voting script... MNis PHP 5 07-06-03 01:01 PM


All times are GMT -5. The time now is 06:34 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.