Make Your Own IPLocator Using VB6
Dear all reader..
In this time i would like to show you how to get location from some IP Address. I using Visual Basic 6.0 to make this program.
How it’s work
Just simple trick, I just get some data from http://www.ip2location.com. lol ![]()
Ok, Lets start it.
We need MSINET.OCX component to make this program.
Place this component in your from and make UI like this
Private Sub btnBlack_Click()
On Error Resume Next
Dim source As String
SetUI
Inet1.Cancel
ucFirefoxWait.Visible = True
Timer1.Enabled = True
If txtIP.Text = “” Then
MsgBox “IP Not valid”
Exit Sub
Else
ucFirefoxWait.PlayWait
source = Inet1.OpenURL(“http://www.ip2location.com/” & txtIP.Text)
lblCountry.Caption = Mid(Split(Split(source, “dgLookup__ctl2_lblICountry”)(1), “”)(0), 3)
lblRegion.Caption = Mid(Split(Split(source, “dgLookup__ctl2_lblIRegion”)(1), “”)(0), 3)
lblCity.Caption = Mid(Split(Split(source, “dgLookup__ctl2_lblICity”)(1), “”)(0), 3)
lblISP.Caption = Mid(Split(Split(source, “dgLookup__ctl2_lblIISP”)(1), “”)(0), 3)
End If
End Sub
Private Sub Form_Load()
SetUI
End Sub
Private Sub SetUI()
lblCountry.Caption = “”
lblRegion.Caption = “”
lblCity.Caption = “”
lblISP.Caption = “”
Timer1.Enabled = False
ucFirefoxWait.Visible = False
End Sub
Private Sub Timer1_Timer()
If lblCountry.Caption <> “” Or lblRegion.Caption <> “” Or lblCity.Caption <> “” Or lblRegion.Caption <> “” Or lblISP.Caption <> “” Then
ucFirefoxWait.StopWait
ucFirefoxWait.Visible = False
Timer1.Enabled = False
End If
End Sub
Try to run it….
So cool right… lol
You can download the executeable file of this program @ http://geocities.com/yadoy666/download/IPLocation.zip


