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


Ismail,

As tushar said remote IP is on the router, not on local computer. You can't have it with API. All APIs work with local resources (most of them). You can get remote IP only if you connect to site that shows you your public IP (like whatismyip.com or showip.org) or connect to router home page and parse the returned page. All routers are installed on specific local IP (our is on 192.168.0.250) but that means you must know on what IP the router is installed, format of the page router returned etc.

> Hi Experts
> "www.showip.org" brought me the IP adress. Still I feel that this is not a reliable method, because in any case the above site is not functional for what ever reason I cannot connect to my clients.
>
> Thank you all
>
> Ismail
>
> > > 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




Borislav Borissov



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