|
-
Apr 4th, 2009, 10:36 AM
#1
Thread Starter
Addicted Member
[RESOLVED] get WAN ip address
I have seen how to get LAN ip address but not routers ip. Does anybody know how to?
I think I am, therefore, I am. I think.
-
Apr 4th, 2009, 11:29 AM
#2
Re: get WAN ip address
Is this what you want?
vb Code:
Option Explicit Private Declare Function URLDownloadToFile Lib "urlmon" _ Alias "URLDownloadToFileA" (ByVal pCaller As Long, _ ByVal szURL As String, ByVal szFileName As String, _ ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long Private Sub Command1_Click() Dim cTemp As String, pos1 As Long Call URLDownloadToFile(0, "http://www.whatismyip.com", _ App.Path & "\ipaddress.htm", 0, 0) If Dir(App.Path & "\ipaddress.htm") <> "" Then cTemp = CreateObject("Scripting.FileSystemObject").OpenTextFile(App.Path _ & "\ipaddress.htm").ReadAll '~~> On the webpage, the IP address is stored after '~~> "Your IP Address Is " pos1 = InStr(1, cTemp, "Your IP Address Is ") '~~> Display IP Address MsgBox Mid(cTemp, pos1 + Len("Your IP Address Is "), 15) Kill App.Path & "\ipaddress.htm" Else MsgBox "Unknown IP Address" End If End Sub
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Apr 4th, 2009, 11:31 AM
#3
Thread Starter
Addicted Member
Re: [RESOLVED] get WAN ip address
Yes that's what i want. Thanks alot
I think I am, therefore, I am. I think.
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
|