goldenix Posted September 29, 2008 Share Posted September 29, 2008 (edited) Hiye.I want to check if a game/login/site server is online. but how can ping the port?This gives me error 4 [4 = Other errors]$var = Ping("85.192.33.142:80",250) If $var > 0 Then Msgbox(0,"Status","Site is Online, roundtrip was:" & $var) Else Msgbox(0,"Status","An error occured with number: " & @error) EndIfoÝ÷ Ù8b²¯zÉzºè¯]Edit: See post 4 For solution. Edited September 29, 2008 by goldenix My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list] Link to comment Share on other sites More sharing options...
DW1 Posted September 29, 2008 Share Posted September 29, 2008 (edited) You just need to increase the timeout on the ping: $var = Ping("85.192.33.142",2000) If $var > 0 Then Msgbox(0,"Status","Site is Online, roundtrip was:" & $var) Else Msgbox(0,"Status","An error occured with number: " & @error) EndIfoÝ÷ Ø@ÈL l¢Ø^欢{aÊ'yö¢çZºÚ"µÍÌÍÝH[Ê ][ÝÎ KNLÌËM ][ÝËL Is because just like typing "Ping 85.192.33.142:80" into a cmd window, a port specification is not allowed on the end of the IP. Edited September 29, 2008 by danwilli AutoIt3 Online Help Link to comment Share on other sites More sharing options...
goldenix Posted September 29, 2008 Author Share Posted September 29, 2008 You just need to increase the timeout on the ping:Is because just like typing "Ping 85.192.33.142:80" into a cmd window, a port specification is not allowed on the end of the IP.oh looks like it was my firewall blocking me from pinging but i still need to ping specific port because the server has world server/ game server/ login server running on same ip but different ports. Is there any other way to check it? My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list] Link to comment Share on other sites More sharing options...
Xand3r Posted September 29, 2008 Share Posted September 29, 2008 (edited) TCPStartup() $timer = TimerInit() If (TCPConnect("85.192.33.142", 80) <> -1) Then ;;server online MsgBox(0, "online", "ping:" & TimerDiff($timer)) Else ;;server offline MsgBox(0, "offline", "ping:" & TimerDiff($timer)) EndIf TCPShutdown() The ping part is not very accurate because it adds some time to the actual ping Edited September 29, 2008 by TheMadman Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro Link to comment Share on other sites More sharing options...
goldenix Posted September 29, 2008 Author Share Posted September 29, 2008 If (TCPConnect("85.192.33.142", 80) <> -1) Then My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list] Link to comment Share on other sites More sharing options...
Xand3r Posted September 29, 2008 Share Posted September 29, 2008 c++ and php habbit sorry Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro 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