How to Check web site

How to Check web site

Postby richard-service » Sun Aug 19, 2018 6:18 am

Hi
How to check or know this web site page live or dead?
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 803
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: How to Check web site

Postby Enrico Maria Giordano » Sun Aug 19, 2018 10:08 am

Code: Select all  Expand view
? HB_PING( "www.google.com" )


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: How to Check web site

Postby horacio » Tue Aug 21, 2018 2:42 pm

Hello Enrico, is it a function of xHarbour?

Saludos
horacio
 
Posts: 1363
Joined: Wed Jun 21, 2006 12:39 am
Location: Capital Federal Argentina


Re: How to Check web site

Postby karinha » Tue Aug 21, 2018 3:44 pm

Code: Select all  Expand view

#include "FiveWin.ch"

Function PingFw( URL )

   LOCAL Hosts
   LOCAL wRet := .T.

   InetInit()
 
   If Empty( URL )

      URL := "www.google.com"

   Endif

   Hosts := InetGetHosts( URL )

   IF Hosts = nil .or. len(Hosts) = 0

      wRet := .F.

   Endif

   InetCleanup()

   ?  wRet

Return wRet
 
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7813
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 115 guests