|
Thread: ip
-
Dec 3rd, 2005, 11:54 AM
#1
Thread Starter
Junior Member
ip
Hey,
i have this script..
Private Sub Form_Load()
Dim a As Integer, b As Integer
Dim strURL As String, strIP As String
'we open the www.whatismyip.com URL and read it whole into strURL, this can take some time
strURL = Inet1.OpenURL("http://www.whatismyip.com/")
'we find where the part before the IP is written
a = InStr(1, strURL, "<TITLE>Your ip is ")
'we find the part after the IP
b = InStr(1, strURL, " WhatIsMyIP.com</TITLE>")
' NOTE: the strURL doesnt have the actual Text you see in the browser in it, it has the HTML
'code of the site in it! You need to watch out for that
'And the IP itself is between these two!
strIP = Mid(strURL, a + 18, b - (a + 18))
'We let the user know what his IP is in form of message box
Text3.Text = strIP
'if user clicked Yes and he wants to copy the IP into the clipboard
If temp = 6 Then
'first clear the clipboard
Clipboard.Clear
'then assign new clipboard text - (our IP)
Clipboard.SetText strIP
End If
Text2.Text = Winsock1.LocalIP
Text1.Text = Winsock1.LocalHostName
End Sub
Private Sub Image2_Click()
On Error Resume Next
Me.WindowState = 0
Do
Me.Top = Me.Top + 10
Me.Left = Me.Left + 10
Me.Width = Me.Width - 20
Me.Height = Me.Height - 20
Loop Until Me.Top >= Screen.Height
'you can change those numbers to make it
' faster
'or slower. right now it is pretty slow.
'
'if the height and width #'s are twice a
' s much
'as the top and left #'s, it will make a
'
' "zooming out" effect and then will fal
' l to the
'bottom of the screen.
Unload Me
End Sub
ok it all works fine, but now when i preview it, instead of it just telling me my ip, it just says this
BLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<TITLE>Your IP Is (79.105.687.228)
....so can anyone help me get everything from the BLIC part allthe way to the <Title> part off?? please that would be sweet if you all could help me and show me how. Thanks so much guyz!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|