Hallo,
Ik heb een inlog script gemaakt maar wil ook dat de gebruiker zijn IP moet invullen. Ik doe dit nu zo:
Private Sub Command1_Click()
Dim a As Integer, b As Integer
Dim strURL As String, strIP As String
strURL = Inet1.OpenURL("http://www.whatismyip.com/")
a = InStr(1, strURL, "<TITLE>Your ip is ")
b = InStr(1, strURL, " WhatIsMyIP.com</TITLE>")
strIP = Mid(strURL, a + 18, b - (a + 18))
If TxtUsername <> "gebruiker" Or TxtWachtwoord <> "wachtwoord" Or Combo1 <> "thuis" Or TxtIp <> "" & strIP & vbCrLf & "" Then
MsgBox "U heeft niet de juiste rechten om dit programma in te komen", vbCritical, "Toegang geweigerd"
Else
Form2.Show
Unload Me
End If
End Sub
Weet iemand waarom hij het IP niet pakt want doe ik:
Msgbox "" & strIP & vbCrLf & ""
Dan geeft die wel het IP weer.
Groet,
Jonathan
Ik heb een inlog script gemaakt maar wil ook dat de gebruiker zijn IP moet invullen. Ik doe dit nu zo:
Private Sub Command1_Click()
Dim a As Integer, b As Integer
Dim strURL As String, strIP As String
strURL = Inet1.OpenURL("http://www.whatismyip.com/")
a = InStr(1, strURL, "<TITLE>Your ip is ")
b = InStr(1, strURL, " WhatIsMyIP.com</TITLE>")
strIP = Mid(strURL, a + 18, b - (a + 18))
If TxtUsername <> "gebruiker" Or TxtWachtwoord <> "wachtwoord" Or Combo1 <> "thuis" Or TxtIp <> "" & strIP & vbCrLf & "" Then
MsgBox "U heeft niet de juiste rechten om dit programma in te komen", vbCritical, "Toegang geweigerd"
Else
Form2.Show
Unload Me
End If
End Sub
Weet iemand waarom hij het IP niet pakt want doe ik:
Msgbox "" & strIP & vbCrLf & ""
Dan geeft die wel het IP weer.
Groet,
Jonathan