no-ip checking

Iniciado por ntaryl, 13 Septiembre 2008, 20:06 PM

0 Miembros y 1 Visitante están viendo este tema.

ntaryl

Good  evening   
Need some  help 
How  can  i  test  my no-ip (ten-no-ip.biz) in  port 80 if  it  work  ?
Hope  to  explain  correct  my question 
thanks   

naderST

#1
You can try connecting with Winsock if it success then it is working.

EDIT:

Something like this:

Add a Winsock control called WS.

Código (vb) [Seleccionar]

Option Explicit

Private Sub Form_Load()
    If CheckNOIPStatus(WS, "google.com", 80) = True Then
        MsgBox "It's working"
    Else
        MsgBox "U_U"
    End If
End Sub

Private Function CheckNOIPStatus(ByVal Winsock As Winsock, ByVal Host As String, ByVal Port As Integer) As Boolean
    Dim OMFG As Long
   
    Winsock.RemoteHost = Host
    Winsock.RemotePort = Port
   
    Winsock.Connect
    DoEvents
   
    While OMFG < 200000
        OMFG = OMFG + 1
        DoEvents
    Wend
   
    If Winsock.State = sckConnected Then
        CheckNOIPStatus = True
    End If
End Function



I am not sure if that is what you want...