Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reading Public IP from Windows
Message
De
20/08/2006 23:54:19
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 6 SP3
OS:
Windows XP SP2
Divers
Thread ID:
01033553
Message ID:
01147179
Vues:
23
Thanks Vladimir!
I understand your code but maybe I didn't explain well.
I don't want to use services like "whatismyip" because if
the service is down I can't obtain the IP.
Thanks again.

>Tony try this:
>
>Local m.myHTML,m.parsed
>parsed = ''
>oParser = Createobject('myParser',@m.parsed)
>ALINES(myarray,m.Parsed)
>MESSAGEBOX("My IP "+myarray[3])
>
>Define Class myParser As Form
>  Add Object oWB As OleControl With ;
>    OleClass = 'Shell.Explorer'
>
>  Procedure Init
>  Lparameters tcParse
>  With This.oWB
>    .Navigate2('http://www.whatismyip.com/')
>    Wait window 'Parsing...' nowait
>    Do While .ReadyState # 4 && Wait for ready state
>    EndDo
>  Endwith
>  tcParse = This.oWB.Document.body.innerText
>  Wait clear
>  Return .f.
>Endproc
>Enddefine
>
***
TONY Nascimento
*****************

"Your mind is like a parachute. It only works if it is open" - Anthony J. D'Angelo

"The desire to know is natural to good men" - Leonardo da Vinci
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform