Hi,
In the process of work, I turn to a certain site. Sometimes this site may not work or work very slowly. Is it possible to assess the condition of the site ?
FUNCTION Verify_Site()
LOCAL cIp, cVret := .F.
WsaStartUp()
cIp := GETHOSTBYNAME( "yoursite.com" )
cIp := GETHOSTBYNAME( "yoursite.com" )
WsaCleanUp()
// Seguranca caso o provedor da microsoft esteja fora do ar...
IF ( cIp <= "0.0.0.0" )
? "oooops!"
WsaStartUp()
cIp := GetHostByName( "otrosite.com" )
cIp := GetHostByName( "otrosite.com" )
WsaCleanUp()
ENDIF
RETURN( cIp<>"0.0.0.0" )
Natter wrote:Thank you, Karinha, it works!
What are the WSAStartup/Wsacleanup functions for in this case?
Why prescribe 2 times:
cIp := GETHOSTBYNAME( "yoursite.com" )
cIp := GETHOSTBYNAME( "yoursite.com" )
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 87 guests