Jump to content
Sign in to follow this  
goldenix

[Solved]_Pinging port Q

Recommended Posts

goldenix

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 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]

Share this post


Link to post
Share on other sites
DW1

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¢Ø^­æ¬¢{'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 by danwilli

Share this post


Link to post
Share on other sites
goldenix

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]

Share this post


Link to post
Share on other sites
Xand3r

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 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

Share this post


Link to post
Share on other sites
goldenix
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]

Share this post


Link to post
Share on other sites
Xand3r

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.