Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 132,328 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,093 people online right now. Registration is fast and FREE... Join Now!




retrieve WAN IP (Router IP) with vb6

 
Reply to this topicStart new topic

retrieve WAN IP (Router IP) with vb6

adsoft_05
post 16 Feb, 2008 - 01:36 AM
Post #1


New D.I.C Head

*
Joined: 16 Feb, 2008
Posts: 2

Pls help me with a suggestion regarding how to find my router IP using VB code. One solution is to call an external web site as http://whatismyip.com/automation/n09230945.asp, but i want that my program to use this IP (so to extract it from this web page).

I used for my program vb6. Wait for a reply!
User is offlineProfile CardPM

Go to the top of the page

PsychoCoder
post 16 Feb, 2008 - 07:22 PM
Post #2


using DIC.Core;

Group Icon
Joined: 26 Jul, 2007
Posts: 8,923



Thanked 118 times

Dream Kudos: 8475

Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions


Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.

Post your code like this: code.gif

Thanks smile.gif
User is offlineProfile CardPM

Go to the top of the page

adsoft_05
post 18 Feb, 2008 - 09:09 AM
Post #3


New D.I.C Head

*
Joined: 16 Feb, 2008
Posts: 2

tks for your suggestion and i will keep in account for my next questions your policy,
anyway i found myself a solution, which i will post bellow:


CODE

Call URLDownloadToFile(0, "http://whatismyip.com/automation/n09230945.asp", App.Path & "\ipaddress.htm", 0, 0)
If Dir(App.Path & "\ipaddress.htm") <> "" Then
    cTemp = CreateObject("Scripting.FileSystemObject").OpenTextFile(App.Path & "\ipaddress.htm").ReadAll
lblWanIP.Caption = cTemp
Kill App.Path & "\ipaddress.htm"
End If


, if there are other solutions , please let me know ... i used this in a small chat program

tks and brgds.

This post has been edited by PsychoCoder: 18 Feb, 2008 - 09:15 AM
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/22/08 02:50AM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month