Forum Moderators: open

Message Too Old, No Replies

Ping Another Server

like pinging the weblogs.com

         

abulhallaj

4:15 pm on Oct 19, 2003 (gmt 0)

10+ Year Member



How can ping another server with standard ASP coding?
I need this to complete my weblog system. and I want a code that my web server automatically ping another server.

Help me! so I glad :)

dmorison

4:25 pm on Oct 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi,

A "ping" so to speak between web applications is normally nothing more than a standard HTTP request; probably using the standard "GET" method, or maybe "POST".

Not sure how you open a remote URL in ASP these days, but last time I did it you could use the XMLDOM object.

Adds:

Just did a quick search; if you're on XP / Server 2003 then you should be able to use this:

[msdn.microsoft.com...]

[edited by: dmorison at 4:35 pm (utc) on Oct. 19, 2003]

abulhallaj

8:09 pm on Oct 19, 2003 (gmt 0)

10+ Year Member



Thanks

I used it and it's good but it need Windows XP or Windows 200 SP3 that may not installed SP3 on some servers.

I need a code that work on all type. it must be!

dmorison

8:13 pm on Oct 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Investigate using the XMLDOM - I think that object has had HTTP wrappers built in for a while and should be more widely available.

Of course you're not reading XML; but you can use the open method to fire an HTTP GET off to some server (which is all you're trying to achieve). The object will just error on the response (unless the server you pinged returned an XHTML response), but you've still sent your PING parameters via the GET method so it doesn't really matter.

abulhallaj

8:15 pm on Oct 20, 2003 (gmt 0)

10+ Year Member



Thanks it's very good for me , the server that i must ping it return an XML message.