Valhalla Legends Forums Archive | Visual Basic Programming | Getting my own IPAddress

AuthorMessageTime
FuZe
Language: VB6

How would I obtain my real IP address that my isp gives me. I can only get my fake lan ip address, but i'm not sure how to get the real one. Thx
September 18, 2003, 10:09 PM
St0rm.iD
Will need to contact a third party server. I suggest connecting via CHAT to battle.net and it will give you your IP address.
September 18, 2003, 10:43 PM
iago
I'm sure there's an easier way than that.
September 18, 2003, 10:55 PM
Grok
Since you're using Visual Basic, I will assume you mean using some edition of Microsoft Windows.

The IP is bound to a network interface. Using the WIN32 API, you can enumerate network adapters. Each enumeration returns a structure containing information. This is enough help to get you started.

Let us know what you come up with!
September 18, 2003, 11:36 PM
Camel
Grok, that wont even begin to help him unless he is connected directly to a WAN interface, which I sincerely doubt based on his post.
September 18, 2003, 11:56 PM
drivehappy
[quote author=FuZe- link=board=5;threadid=2749;start=0#msg21613 date=1063922996]
Language: VB6

How would I obtain my real IP address that my isp gives me. I can only get my fake lan ip address, but i'm not sure how to get the real one. Thx
[/quote]

The easiest way would be to find a site that determines your external IP address. Use the INET OCX to download the page and parse the IP out of the data.
September 19, 2003, 1:51 AM
iago
My ISP used to make me use a proxy for port 80, so it would be wrong.

Good site is www.network-tools.com
September 19, 2003, 2:07 AM
CupHead
The class I wrote to do this connected to http://www.whatismyip.com and parsed the HTML to find the IP. Even enumerating the local IP addresses won't give you the WAN address if you're behind a router or two.
September 19, 2003, 3:28 AM
St0rm.iD
what the fuck, why do people ignore my posts all the time?
September 19, 2003, 10:53 AM
j0k3r
[quote author=FuZe- link=board=5;threadid=2749;start=0#msg21613 date=1063922996]
Language: VB6

How would I obtain my real IP address that my isp gives me. I can only get my fake lan ip address, but i'm not sure how to get the real one. Thx
[/quote]
I think if you go to 'Local Area Network' in the D2 login page, it will give you your correct IP... If not then Storm had a good idea. I'm not sure how accurate it is though because I can't even host games on war3 due to my firewall/router.

Storm -- maybe he tried it and it didn't work so instead of flaming you he said nothing... or maybe he hasn't checked the forum again... who knows.
September 19, 2003, 11:25 AM
Adron
[quote author=St0rm.iD link=board=5;threadid=2749;start=0#msg21684 date=1063968806]
what the fuck, why do people ignore my posts all the time?
[/quote]

Probably because Grok posted after you and bears much authority and hardly ever makes a mistake, so when he now might have made one, everyone jumped at the chance to bash him.
September 19, 2003, 12:18 PM
Grok
[quote author=Adron link=board=5;threadid=2749;start=0#msg21694 date=1063973894]
[quote author=St0rm.iD link=board=5;threadid=2749;start=0#msg21684 date=1063968806]
what the fuck, why do people ignore my posts all the time?
[/quote]

Probably because Grok posted after you and bears much authority and hardly ever makes a mistake, so when he now might have made one, everyone jumped at the chance to bash him.
[/quote]

St0rm, heh, it's been observed dozens of times that people ignore your completely legitimate and workable solutions.

Adron, I make plenty of mistakes. But you're correct, there are a number of insecure people here who are more comfortable being critics than being creators. Rather than come up with solutions themselves, and let other people criticize them, they bash people who are trying to offer help. Camel is a primary example of such a person.
September 19, 2003, 3:29 PM
Camel
[quote author=Grok link=board=5;threadid=2749;start=0#msg21706 date=1063985382]Adron, I make plenty of mistakes. But you're correct, there are a number of insecure people here who are more comfortable being critics than being creators. Rather than come up with solutions themselves, and let other people criticize them, they bash people who are trying to offer help. Camel is a primary example of such a person.[/quote]
Interesting view. My intent, however, was to save him some agony.
[edit] I didn't give an answer because St0rm already did.
September 19, 2003, 8:29 PM
DarkVirus
I guess I'm confused... Are you looking for some type of code to write in VB 6.0 or VB .Net to reveal your real IP or are you just trying to generally find your ISP given IP...

Also are you behind a router of some sort or are you hooked directly to the net via modem. If that's the case there are multiple ways of finding your IP given to you by your ISP... If your looking for your LAN IP then I suggest the normal methods either in code using winsock or dsSocket32 or you could just go to Command Prompt or DOS and type ipconfig /all

If you are looking for your ISP given IP then I suggest looking at your router settings... If you don't have access to that type of information (assuming your even behind a router) then I can't help you in terms of coding because I'm not at my computer but on my g/f's comp.

So again, what exactly are you trying to do in terms of the questions asked above?
September 21, 2003, 12:42 AM
iago
[quote author=DarkVirus link=board=5;threadid=2749;start=0#msg21843 date=1064104920]
I guess I'm confused... Are you looking for some type of code to write in VB 6.0 or VB .Net to reveal your real IP or are you just trying to generally find your ISP given IP...

Also are you behind a router of some sort or are you hooked directly to the net via modem. If that's the case there are multiple ways of finding your IP given to you by your ISP... If your looking for your LAN IP then I suggest the normal methods either in code using winsock or dsSocket32 or you could just go to Command Prompt or DOS and type ipconfig /all

If you are looking for your ISP given IP then I suggest looking at your router settings... If you don't have access to that type of information (assuming your even behind a router) then I can't help you in terms of coding because I'm not at my computer but on my g/f's comp.

So again, what exactly are you trying to do in terms of the questions asked above?
[/quote]

He's using vb6, so ipconfig /all wouldn't be too useful, unless he parses the information from there (I don't know how to use a shell like that, though). I get the impression that he isn't behind a router, but that he has multiple network connections.

It might be useful to ask, what type of internet connection do you have? If it's DSL, it's harder since there's a LAN connection to your modem, then another connection from the modem to the internet.
September 21, 2003, 11:29 AM
St0rm.iD
...or you could do what I said, which takes, oh, maybe thirty seconds to implement?
September 21, 2003, 2:38 PM
iago
That involves depending on a third-party server, though, which isn't always a good idea. Although, you can list several battle.net servers so if one is down, or you're banned from one, you can just switch.
September 21, 2003, 11:07 PM
FuZe
Thanks guys for the help
September 21, 2003, 11:44 PM
DarkExperts
to obtain ur ip address go to start>run and type in
"winipcfg" with out the " though ur system ip configuration should come up
September 29, 2003, 10:18 PM
K
[quote author=DarkExperts link=board=5;threadid=2749;start=15#msg22587 date=1064873905]
to obtain ur ip address go to start>run and type in
"winipcfg" with out the " though ur system ip configuration should come up
[/quote]

Except....
1) this will only work on win9x, not NT/2k/XP.
2) this will not give you your external IP address.
3) this is not a programmatic solution.
September 29, 2003, 10:25 PM
iago
[quote author=K link=board=5;threadid=2749;start=15#msg22588 date=1064874315]
[quote author=DarkExperts link=board=5;threadid=2749;start=15#msg22587 date=1064873905]
to obtain ur ip address go to start>run and type in
"winipcfg" with out the " though ur system ip configuration should come up
[/quote]
1) this will only work on win9x, not NT/2k/XP.
[/quote]

Can you ipconfig for that :)
September 29, 2003, 10:38 PM
Seven
Doesn't ICQ give the real IP?
October 16, 2003, 12:03 PM
Yoni
[quote author=Seven link=board=5;threadid=2749;start=15#msg24342 date=1066305791]
Doesn't ICQ give the real IP?
[/quote]
That's a terribly unreliable way of getting it.
October 16, 2003, 12:08 PM
St0rm.iD
Or you could do what I said.
October 16, 2003, 10:46 PM
-Death-
http://www.ThugProductions.net/

Go to the Downloads section.
All you need. It is freaken awsome.

:) ;) :D ;D >:( :( :o 8) ??? ::) :P :-[ :-X :-\ :-:-* :'(
October 17, 2003, 2:15 AM
CrAz3D
Add a winsock control then [code]winsock1.LocalIP[/code]
October 18, 2003, 3:53 AM
Fr0z3N
that wouldn't get your real ip for example if your on a router.
October 18, 2003, 2:43 PM
Kp
[quote author=Fr0z3N link=board=5;threadid=2749;start=15#msg24508 date=1066488208]that wouldn't get your real ip for example if your on a router.[/quote]Of course it would get your real [internal] IP. The problem is he wants his external IP address, which is known only by the NAT device and other things outside it.
October 18, 2003, 3:02 PM
St0rm.iD
Or you could so what I said.
October 20, 2003, 12:51 AM
iago
[quote author=St0rm.iD link=board=5;threadid=2749;start=15#msg24677 date=1066611099]
Or you could so what I said.
[/quote]

Perhaps he wants a variety of options?
October 20, 2003, 1:31 AM
Adron
Why do people keep posting suggestions for getting the local IP?
October 20, 2003, 10:50 AM
Hitmen
Because they don't know the difference?
October 20, 2003, 8:48 PM

Search