Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #7585
| From | "Jamal" <someone@example.com> |
|---|---|
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: Checking internet connection |
| Date | 2014-12-05 10:54 -0500 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <m5skf8$ucr$1@speranza.aioe.org> (permalink) |
| References | <m5ql5u$27t$1@ls237.t-com.hr> <jmr18at28p5sjn1rfdgp5jn64fo57g2bb5@4ax.com> <m5s7ii$r0g$1@ls237.t-com.hr> |
Jozo,
I think the function I posted is the most reliable way to check if there is
an internet connection, otherwise, you will go crazy checking if devices are
connected to the computer are disabled or not, cables plugged or not,
router, dns issues, etc. Sorry, you can set a timeout value.
I chose Microsoft.com because it is hardly down. Similarly, you can pass any
other website like Google.com.
If someone has a better solution, please post here.
Jamal Assaf
"Jozo" wrote in message news:m5s7ii$r0g$1@ls237.t-com.hr...
Hello Dick,
Thanks for the example that works very good, but here is one problem. When
there is no internet first attempt searching takes 40 seconds, each other
takes 25 seconds. It would be good if I could control how long will attempt
to search internet. Documentation by GetDocumentByURL doesn't offer
possibility for that.
Jozo
"D.J.W. van Kooten" <vankooten@removethis.ic2.com> wrote in message
news:jmr18at28p5sjn1rfdgp5jn64fo57g2bb5@4ax.com...
> On Thu, 4 Dec 2014 22:56:36 +0100, "Jozo" <racunalo@os.t-com.hr>
> wrote:
>
> Hello Jozo,
>>
>>Has somebody source example for checking internet connection.
>>I used this example that shows internet connection although router is
>>down.
>
> This one I got from Jamal. I think it's a simple trick which should
> work quite well
>
> FUNCTION IsInternetConnection() AS LOGIC PASCAL
> //#s Check if we have an internet connection 27-12-2012
> //#s Jamal NG
> //#x
> //#l
> //#l
> //#l
> //#l
> //#p
> //#p
> //#r
> //#e
> //#e
> LOCAL oMyHttp:= CHttp{} AS CHttp
> RETURN ( SLen(oMyHttp:GetDocumentByURL("http://microsoft.com")) > 0 )
>
> Dick
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Checking internet connection "Jozo" <racunalo@os.t-com.hr> - 2014-12-04 22:56 +0100
Re: Checking internet connection D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2014-12-05 00:32 +0100
Re: Checking internet connection "Jozo" <racunalo@os.t-com.hr> - 2014-12-05 13:15 +0100
Re: Checking internet connection "Jamal" <someone@example.com> - 2014-12-05 10:54 -0500
Re: Checking internet connection "Valery N." <mustangsoftcom@gmail.com> - 2014-12-05 09:50 -0800
Re: Checking internet connection "Valery N." <mustangsoftcom@gmail.com> - 2014-12-05 04:19 -0800
csiph-web