Re: how to know whether web server of a remote machine is running or not

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello balwant,

Tuesday, May 10, 2005, 5:59:15 AM, you wrote:
b> is there any method to know whether the other webserver is running
b> or not.

http://us2.php.net/fsockopen

You'll be doing what's termed an HTTP Ping. You make a socket
connection to the other server, perform a GET request on a page
(preferably small), examine the returned headers for a Status 200
(which means OK).

If you get that, the webserver responded and served up the page.

You might just be able to do a HEAD request, but I haven't tried it.


-- 
Leif (TB lists moderator and fellow end user).

Using The Bat! 3.5 Return RC5 under Windows XP 5.1
Build 2600 Service Pack 2 on a Pentium 4 2GHz with 512MB

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux