ADDR = IP 'HOLDS IP ADDRESS If VALIDATE_IP(ADDR) = True Then 'FUNCTION TO VALIDATE IP BY USING THIS PATTERN: ^(([01]?\d\d?|2[0-4]\d|25[0-5])\.){3}([01]?\d\d?|25[0-5]|2[0-4]\d)$ BUFFER = SOURCE("http://www.geobytes.com/IpLocator.htm?GetLocation&IpAddress=" & ADDR) 'FUNCTION THAT FETCHES THE URL SOURCE DATA = Split(BUFFER, """ value=") FLAG = Split(BUFFER, "<a href=" & Chr(34) & "FreeServices.htm" & Chr(34) & "><img border=" & Chr(34) & "0" & Chr(34) & "src=" & Chr(34) & "http://www.geobytes.com/Flags/") 'LAZY XD FLAG = Split(FLAG(1), Chr(34)) PIC = "http://www.geobytes.com/Flags/" & FLAG(0) LOAD_PIC PIC 'FUNCTION TO DOWNLOAD THE PICTURE AND DISPLAY IT If UBound(DATA()) > 33 Then For M = 13 To 34 DAT = Split(DATA(M), Chr(34)) GEOLOC.G(Val(M) - 13).Caption = DAT(0) 'GET GEO LOCATIONS AND DISPLAY THEM DoEvents Next M End If Else MsgBox "INVALID IP!", vbInformation, "" GEOLOC.IP.Text = vbNullString End If
Isnin, Jun 23, 2014
VB.net : Geo Location
Label:
Pengaturcaraan,
VB,
Visual Studio
Langgan:
Catat Ulasan (Atom)
0 ulasan:
Catat Ulasan
Selamat datang ke 0x2013LΣΣT. Sekiranya anda mempunyai persoalan, pandangan, permintaan, bantuan, cadangan dan sebagainya. Tinggalkan pesanan anda ke dalam kotak komen. Terima kasih !
- http://0x2013.blogspot.com -