Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: tushar Kanvinde
  Where is tushar Kanvinde?
 Kolhapur, Maharastra
 India
 tushar Kanvinde
 To: ismail pp
  
 
 
 ismail pp
 Tags
Subject: RE: IP Adress
Thread ID: 112530 Message ID: 112554 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Other
Date: Thursday, November 09, 2006 3:38:59 PM         
   


> Sir
> The code provided returns nothing.The site "whatismyip.com" seem blocked and I think it is not practical. Please provide API code or something else.
>
> Thankfully
>
> Ismail
>
> > > Hi Experts
> > >
> > > I have a IP adress retrieving program (got from download section) which worked with Dialup conections. But recently subscribed to ADSL (Modem Linksys Model WAG200G, with 4 port Router) connected to NIC is not giving the dynamic IP adress of ISP, Iam getting hardware IP only ie: 192.168.1.100. Anybody can provide code to retireve the dynamic IP adress provided by ISP?.
> > >
> > > Iam using RADMIN to access my clients over internet using IP adress.
> > >
> > > Thankfully
> > >
> > > Ismail

> >
> > If you have INet connection you could parse the string returned by WhatIsMyIP.COM and get your publick IP:
> >
> > LOCAL oIe AS InternetExplorer.Application
> > LOCAL tDt
> > 
> > oIe = CREATEOBJECT([InternetExplorer.Application])
> > oIe.Navigate2([whatismyip.com])
> > tDt = DATETIME()
> > 
> > DO WHILE oIe.ReadyState <> 4 AND DATETIME() - tDt < 30
> >    INKEY(0.01) 
> > ENDDO
> > 
> > ** Extract public IP
> > ALINES(laLines,oIe.Document.Body.InnerText)
> > MESSAGEBOX([Your public IP is ]+ALLTRIM(laLines[3]))
> > oIe = NULL
> > 

> >
> >
> > Borislav Borissov
> >
> >

The IP address you require is not of your computer but of the router. You can try to create an instance of Internet Explorer, Log into the router and find the address. This will change from router to router.

If you have access to a php enabled web server, host a php file containing
<?php
echo $_SERVER["REMOTE_ADDR"];
?>


Opening it will give you the IP address. This is what I am doing currently.

You can also search for iphlpapi in http://www.news2news.com though i did not get very far there.

Regards
Tushar

ENTIRE THREAD

IP Adress Posted by ismail pp @ 11/9/2006 12:14:22 PM
RE: IP Adress Posted by Borislav Borissov @ 11/9/2006 12:35:39 PM
RE: IP Adress Posted by ismail pp @ 11/9/2006 2:13:58 PM
RE: IP Adress Posted by Borislav Borissov @ 11/9/2006 2:52:15 PM
RE: IP Adress Posted by Ken Murphy @ 11/9/2006 2:53:35 PM
RE: IP Adress Posted by ismail pp @ 11/9/2006 3:04:27 PM
RE: IP Adress Posted by Ken Murphy @ 11/9/2006 4:47:57 PM
RE: IP Adress Posted by tushar @ 11/9/2006 3:38:59 PM
RE: IP Adress Posted by ismail pp @ 11/9/2006 9:24:03 PM
RE: IP Adress Posted by Borislav Borissov @ 11/9/2006 9:38:37 PM