Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parce the IP Address
Message
 
 
To
07/06/2004 16:20:21
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00910906
Message ID:
00910928
Views:
25
Doyle,
Tryy
? STREXTRACT(ox.Document.Body.InnerText, "is ", CHR(13))<.pre> Or you can use another web site that return IP w/o extra text. <pre>...
ox.navigate2("http://www.whatismyip.org")
? ox.Document.Body.InnerText
>
>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
>
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform