Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determining IP address
Message
De
06/01/2005 12:56:24
 
 
À
05/01/2005 18:01:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
00974538
Message ID:
00974737
Vues:
16
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
>
>
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform