Testing if there is an Internet Connection
Hi all, Is there a way to test if the machine you are running on currently connected to the Internet? Thanks a lot All the Best Dave ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Testing if there is an Internet Connection
Dave wrote: Hi all, Is there a way to test if the machine you are running on currently connected to the Internet? Thanks a lot All the Best Dave I use a "baby face" method where the goal is to be sure they are talking to our own servers put a file your web site: ping.txt put the word "true" into that file then it is as simple as : on testConnection if not ((url "http://www.himalayanacademy.com/ping.txt";)= "true") then answer "Please log in to the internet and try again." with "OK" end if end testConnection I see a lot of "macho" solutions but I never understood, at least in our context (wanting to be sure our users can access our servers) why there is any need for more than this. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Testing if there is an Internet Connection
Hi Dave, This has been discussed many times on this list: check the archives and you'll find many posts with many solutions depending on possible firewalls and many other things. As for me I use the following script that feeds a Boolean global var allowing to know if the connection is running or not. Sorry but I don't remember who wrote the basis ;-) Le 30 nov. 07 à 17:25, Dave a écrit : Is there a way to test if the machine you are running on currently connected to the Internet? Thanks a lot All the Best Dave constant kNotifyDelay = 10 constant kCheckDelay = 10 local lTestMessage local lTestServer -- on CheckForInternet NetConnectionTest -- if "CheckForInternet" is not in the pendingMessages then send "CheckForInternet" to me in kCheckDelay seconds end if end CheckForInternet -- on NetConnectionTest if the DNSServers is empty then NetConnectionNotify false -- else put 1 into lTestServer open socket to line 1 of the DNSServers with message "NetConnectionSocketOpen" -- end if end NetConnectionTest -- on NetConnectionSocketOpen pSocket send "NetConnectionNotify true" to me in kNotifyDelay milliseconds -- end NetConnectionSocketOpen -- on socketError pSocket, pErrorString if pSocket is line lTestServer of the DNSServers then NetConnectionNotify false -- end socketError -- on socketTimeout pSocket if pSocket is line lTestServer of the DNSServers then NetConnectionNotify false -- close socket pSocket else ## -- for other possible connections end if end socketTimeout -- on NetConnectionNotify pStatus global gInternetConnected local tResult,tCommand - if lTestMessage <> empty then if line lTestServer of the DNSServers is among the lines of the openSockets then close socket line lTestServer of the DNSServers end if put pStatus into gInternetConnected -- check this boolean global to know internet status put empty into lTestMessage put empty into lTestServer end if end NetConnectionNotify Best regards from Paris, Eric Chatonet. Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/ Email: [EMAIL PROTECTED]/ ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Testing if there is an Internet Connection
I would think you could ping some site you know is always going to be there (ie., CNN, Google, etc). Make sure the site actually will respond to a ping first though! Len Morgan Dave wrote: Hi all, Is there a way to test if the machine you are running on currently connected to the Internet? Thanks a lot All the Best Dave ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Testing if there is an Internet Connection
> Is there a way to test if the machine you are running on currently > connected to the Internet? As suggested, grabbing the HTML (put URL...) from a large, well known site is one way. But if the goal is to have your stack interact with your own site, it would be better to test that site since being connected to the Internet will not help users if your site is not responding. Regards, Scott Rossi Creative Director Tactile Media, Multimedia & Design ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Testing if there is an Internet Connection
Hi Dave, This question comes up from time to time. You can see what's been said before by looking at this (but watch line wrap): http://search.gmane.org/?query=connected+to+internet&group=gmane.comp.ide.revolution.user Thanks - Phil Davis Dave wrote: Hi all, Is there a way to test if the machine you are running on currently connected to the Internet? Thanks a lot All the Best Dave ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Testing if there is an Internet Connection
Aloha Folks, I use the following approach. I open a socket to my server, if it opens, I request an HTTP HEAD from it and inspect the result. all I need is to have a clear path to my server. Many general purpose solutions that rely on DNS or Broadcast packets may fail if the user has a home network or intranet where it really appears that he is on the internet but he's only on a LAN. Some friends even run their own DNS servers and have domains setup on their lan... detecting internet may become hard on those extreme scenarios, so instead of detecting the internet, try detecting your server, much easier. Andre On 12/1/07, Sivakatirswami <[EMAIL PROTECTED]> wrote: > Dave wrote: > > Hi all, > > > > Is there a way to test if the machine you are running on currently > > connected to the Internet? > > > > Thanks a lot > > All the Best > > Dave > > I use a "baby face" method where the goal is to be > sure they are talking to our own servers > > put a file your web site: > > ping.txt > > put the word "true" into that file > > then it is as simple as : > > on testConnection >if not ((url "http://www.himalayanacademy.com/ping.txt";)= "true") then > answer "Please log in to the internet and try again." with "OK" > end if > end testConnection > > > I see a lot of "macho" solutions but I never understood, at least in our > context (wanting to be sure our users can access our servers) why there > is any need for more than this. > > > > > > > > > > > > ___ > > use-revolution mailing list > > use-revolution@lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-revolution > > > > ___ > use-revolution mailing list > use-revolution@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-revolution > -- http://www.andregarzia.com All We Do Is Code. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Testing if there is an Internet Connection
Eric- Friday, November 30, 2007, 10:07:00 AM, you wrote: > This has been discussed many times on this list: check the archives > and you'll find many posts with many solutions depending on possible > firewalls and many other things. But my favorite is answer "Are you connected to the internet?" with yes and no -- -Mark Wieder [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Testing if there is an Internet Connection
Mark, you made my day! :-D Now I want Rev to have the following options: do as appleScript do as vbScript do as I told you :-D On 12/1/07, Mark Wieder <[EMAIL PROTECTED]> wrote: > Eric- > > Friday, November 30, 2007, 10:07:00 AM, you wrote: > > > This has been discussed many times on this list: check the archives > > and you'll find many posts with many solutions depending on possible > > firewalls and many other things. > > But my favorite is > > answer "Are you connected to the internet?" with yes and no > > -- > -Mark Wieder > [EMAIL PROTECTED] > > ___ > use-revolution mailing list > use-revolution@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-revolution > -- http://www.andregarzia.com All We Do Is Code. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Testing if there is an Internet Connection
> Now I want Rev to have the following options: > > do as appleScript > do as vbScript > do as I told you No, sorry Andre. That 3rd option should be "do what I meant", not "do what I told you" :-) Sarah ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Testing if there is an Internet Connection
Now I want Rev to have the following options: do as appleScript do as vbScript do as I told you No, sorry Andre. That 3rd option should be "do what I meant", not "do what I told you" :-) Sarah I hate this damn computer -- I wish that I could sell it. It never does what I want it to, Only what I tell it. -- Peter Peter M. Brigham [EMAIL PROTECTED] http://home.comcast.net/~pmbrig/ -- Just wondering... if you try to fail, and succeed, which have you done? ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution