Click here to Skip to main content
15,353,970 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
hello

hello i will try to explain what i need to do in a different way, and sorry for my poor english

i need to start a new project that can get the public ip address of my internet using hostname in no-ip.com or dyn.com
those sites gives you hostname that you can put in your internet router in the dynamic ip page
so when you log to your account from anywhere you can see the current public ip of that router

now what i need is to use vb net to read that ip inside the project (not by going to no-ip.com or dyn.com)

with thanks


What I have tried:

i only where able to setup the account into the router
am new to programing and i don`t know how to solve it
Posted
Updated 6-Jun-22 16:54pm
v2
Comments
OriginalGriff 26-Mar-22 4:36am
   
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with - we get no other context for your project.
Imagine this: you go for a drive in the country, but you have a problem with the car. You call the garage, say "it broke" and turn off your phone. How long will you be waiting before the garage arrives with the right bits and tools to fix the car given they don't know what make or model it is, who you are, what happened when it all went wrong, or even where you are?

That's what you've done here. So stop typing as little as possible and try explaining things to people who have no way to access your project!

Use the "Improve question" widget to edit your question and provide better information.
oqapsking 27-Mar-22 12:46pm
   
i tried a diffrent way to explain my request
sorry

1 solution

Not sure if you found an answer that works. I do not know which router you have or what the interface to it would be to get the information you are requesting. I needed my public IP for a project and here is the basis of the solution I use. I would add a try / catch / end try loop to watch for errors at run time.


Dim public_ip as string = fn_GETIP()
MSGBOX(public_ip)


Public Function fn_GETIP() As String
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12
Dim client As New System.Net.WebClient
dim MY_IP as string = ""
MY_IP = client.DownloadString("https://api.ipify.org")
Return MY_IP
End Function
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900