AzKay Posted July 19, 2006 Share Posted July 19, 2006 With the "ping" command, it only seems to work, if I add a symbol on the end of the site. Ping("www.google.com") If @error = 0 Then MsgBox(0, "", "Offline") Else MsgBox(0, "", "Online") EndIf If I try ping that, it reads offline, but if I make it .com: or .com/ it works. Not my question though. Is there a function to check the server, but through a specific port? Liek, If I wanted to check the status of a game server, eg, login server character server & map server, I would have to ping the same server, but at 3 different ports. # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
Developers Jos Posted July 19, 2006 Developers Share Posted July 19, 2006 (edited) With the "ping" command, it only seems to work, if I add a symbol on the end of the site. Ping("www.google.com") If @error = 0 Then MsgBox(0, "", "Offline") Else MsgBox(0, "", "Online") EndIf oÝ÷ Øȶ¼©x-«b¶·vÊ~X§y»ò&jG¢µÊ&¢·(øÂä°Ú-*®zËb¢{a¢è!þ«¨µá+® For your second question: The TCP... functions should be able to initial a connection to a specific port to test the availability of the function. Edited July 19, 2006 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
AzKay Posted July 19, 2006 Author Share Posted July 19, 2006 Ooo, thanks ^^ # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
AzKay Posted July 19, 2006 Author Share Posted July 19, 2006 I tryed TCPConnect(), Doesnt seem to connect, "Wrong port" or something. If trying to connect: 64.233.187.99:80 which is google.be on port 80, I know its right, because I sniffed it. Any ideas? # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
Developers Jos Posted July 20, 2006 Developers Share Posted July 20, 2006 I tryed TCPConnect(), Doesnt seem to connect, "Wrong port" or something. If trying to connect: 64.233.187.99:80 which is google.be on port 80, I know its right, because I sniffed it. Any ideas?Maybe show what you have coded ? This seems to work fine: $server = "64.233.187.99" $port = "80" Ping($server) If @error Then MsgBox(0, "", "Offline") Else $rc = TCPStartup() $rc = TCPConnect($server,$port) $Err = @error If $rc = -1 Then MsgBox(0, "Cannot connect", "Cannot connect Error:" & $Err ) Else MsgBox(0, "Service OK","Service OK" ) EndIf TCPShutdown() EndIf SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
AzKay Posted July 20, 2006 Author Share Posted July 20, 2006 Works, hehe # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now