Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determining IP address
Message
From
06/01/2005 12:56:24
 
 
To
05/01/2005 18:01:35
General information
Forum:
Visual FoxPro
Category:
Internet applications
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
00974538
Message ID:
00974737
Views:
17
Very cooool... That is exactly what I needed. I have to know when the dynamic IP address at my client's house changes. I can use this routine to find out.

Regards and thanx again.
Neil

>>Hi,
>>
>>Does anyone know how to determine the dynamic IP address provided by the Internet provider on a given installation using VFP code. I want to build a service that checks if the IP changed. Once a change is detected I would then e-mail the new address to concerned parties.
>>
>>Regards,
>>Neil
>
>The folowing is some code I use. You have to have an internet connection and can navigate to to www.whatismyip.com
>
>
>?GetPublicIPAddress()
>
>Function GetPublicIPAddress
>loExplorer = CreateObject("InternetExplorer.Application")
>loExplorer.Navigate2("www.whatismyip.com")
>DO WHILE loExplorer.readystate <> 4
>ENDDO
>loDoc = loExplorer.Document
>MyPublicIp = loDoc.Body.Innertext
>m.lcReturnYourIP = "UNKNOWN"
>if ratc("Your IP is ",MyPublicIp,1) > 0
>	m.lcReturnYourIP = strtran(strtran(alltrim(substr(myPublicIp,;
>	ratc("Your IP is ",MyPublicIp,1)+11,15)),chr(13)),chr(10))
>endif
>return m.lcReturnYourIP
>
>
>
Previous
Reply
Map
View

Click here to load this message in the networking platform