server uptime application

Reply

Join Date: Mar 2008
Posts: 70
Reputation: forzadraco is an unknown quantity at this point 
Solved Threads: 1
forzadraco forzadraco is offline Offline
Junior Poster in Training

server uptime application

 
0
  #1
Feb 9th, 2009
anyone can help mo to tell the algorithm how to make server uptime application like serveruptime.com?

http://www.duniaislam.site50.net
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 18
Reputation: BeachyUK is an unknown quantity at this point 
Solved Threads: 0
BeachyUK BeachyUK is offline Offline
Newbie Poster

Re: server uptime application

 
0
  #2
Feb 9th, 2009
Hi Darco,

I assume you're after the PHP function you'd use for checking whether a server is up (the rest will just be a database of the sites you're monitoring).

Personally, I'd probably about it with a socket_connect call, that should be able to confirm a connection existing to an address, which I guess is all you are looking to confirm.

James

BeachyUK.com
BePing - Free Windows Ping Utility
Web Hosting from £5 per year (~$4pa) - Special Offer while we test our payment systems
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 18
Reputation: BeachyUK is an unknown quantity at this point 
Solved Threads: 0
BeachyUK BeachyUK is offline Offline
Newbie Poster

Re: server uptime application

 
0
  #3
Feb 9th, 2009
Actually, thinking it through, perhaps I'd go with something more like this... If you wanted to, you could read the contents of the URL, though I imagine you just want an UP or DOWN decision, I think the below would do the trick.

  1. $cn = fsockopen ('http://www.daniweb.com', 443, $errnum, $errdesc, 30);
  2.  
  3. if (!$cn) {
  4. // Can't Connect to URL
  5. $sitestatus="DOWN";
  6. }else{
  7. // Connected fine - URL works
  8. $sitestatus="UP";
  9. }

James

BeachyUK.com
BePing - Free Windows Ping Utility
Web Hosting from £5 per year (~$4pa) - Special Offer while we test our payment systems
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC