[PHP]Server Status

This is guide mostly for website tools and code, for example CMS or registration scripts.
There can also be tools.

Moderators: osRose dev team, ospRose dev team, osiRose dev team, Moderators

Re: [PHP]Server Status

Postby lmame on Mon Oct 15, 2007 1:13 am

The code is simple... What do you want more?

You can use it inside a <img /> HTML field...

Else simply use fsockopen and change timeout value... Here is an example with IP 192.168.1.125 as server IP and port 29000 and timeout 2, change the values and put the code you want in OK and not good cases...

  1.  
  2. $timeout=2;
  3.  
  4.   if ( ( $sock = @fsockopen("192.168.1.125",29000, $errno, $errstr, $timeout) ) !== FALSE )
  5. {
  6.    //Ok
  7.  }      
  8.     else
  9. {
  10.  //not good
  11. }
  12.  
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: [PHP]Server Status

Postby Rifke on Mon Oct 15, 2007 3:34 pm

Rifke
Pero pero
Pero pero
 
Posts: 719
Joined: Thu Aug 09, 2007 3:01 pm
Location: Belgium

Previous

Return to PHP / Web Guides, Scripts and tools.

Who is online

Users browsing this forum: No registered users and 6 guests