Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parce the IP Address
Message
De
07/06/2004 16:20:21
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Parce the IP Address
Divers
Thread ID:
00910906
Message ID:
00910906
Vues:
87
Re: Thread ID: 893826 Message ID: 893973

I'm looking for an easier (or more elegant) way to parce the IP Address
ox = Createobject('internetexplorer.application')
ox.navigate2("http://www.whatismyip.com/")
Do While ox.busy
Enddo
If Type("ox") = "O"
	odoc = ox.Document
	gcIPAddress = odoc.Body.InnerText

	gcIPAddress = Substr(gcIPAddress,1,50)
	lnStart = At( Left( Chrtran(gcIPAddress, Chrtran(gcIPAddress, "0123456789", ""), ""),1), gcIPAddress)
	lnEnd = Rat( Right( Chrtran(gcIPAddress, Chrtran(gcIPAddress, "0123456789", ""), ""),1), gcIPAddress)
	gcIPAddress = Substr(gcIPAddress,lnStart,(lnEnd-lnStart)+1)

	? ":"+gcIPAddress+":"

Endif
Thanks,

dg
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform