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

Your name:

Reply:


Posted by Leif Gregory on 05/10/05 18:00

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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация