Following is Visual Foxpro code to get internet IP.
Anyone can help to translate it to FWH plz :-
loExplorer = CreateObject("InternetExplorer.Application")
loExplorer.Navigate2("www.whatismyip.com")
DO WHILE loExplorer.readystate <> 4
ENDDO
loDoc = loExplorer.Document
cIp = UPPER(loDoc.Body.Innertext)
internet IP (plz translate)
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: internet IP (plz translate)
This is a working sample in pure xHarbour:
EMG
Code: Select all
FUNCTION MAIN()
LOCAL oExplorer := CREATEOBJECT( "InternetExplorer.Application" )
oExplorer:Navigate2( "www.whatismyip.com" )
WHILE oExplorer:ReadyState <> 4
HB_IDLESLEEP( 1 )
ENDDO
? UPPER( oExplorer:Document:Body:InnerText )
oExplorer:Quit()
INKEY( 0 )
RETURN NIL
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Here it is (please note that you need of hbole.lib):
EMG
Code: Select all
FUNCTION MAIN()
LOCAL oExplorer := TOleAuto():New( "InternetExplorer.Application" )
oExplorer:Navigate2( "www.whatismyip.com" )
WHILE oExplorer:ReadyState <> 4
HB_IDLESLEEP( 1 )
ENDDO
? UPPER( oExplorer:Document:Body:InnerText )
oExplorer:Quit()
INKEY( 0 )
RETURN NIL
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact: