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
>
>
>