Re: [PHP] Checking for internet connection.

2009-12-23 Thread Kim Madsen
Hi Bob Bob McConnell wrote on 23/12/2009 14:35: From: Andy Shellam And I was pointing out that this would not be a valid test when there is a caching DNS on the LAN. I also pointed out how to avoid caching issues - the comment was aimed at the author of the message before mine. Too much

RE: [PHP] Checking for internet connection.

2009-12-23 Thread Bob McConnell
From: Kim Madsen Bob McConnell wrote on 23/12/2009 14:35: From: Andy Shellam And I was pointing out that this would not be a valid test when there is a caching DNS on the LAN. I also pointed out how to avoid caching issues - the comment was aimed at the author of the message before

Re: [PHP] Checking for internet connection.

2009-12-23 Thread Daniel Egeberg
On Wed, Dec 23, 2009 at 14:35, Bob McConnell r...@cbord.com wrote: I don't keep copies of every message in any of the dozens of mailing lists and news groups I follow, so there is no simple way to go back through the conversation to figure out where it all came from. Fortunately, other people

Re: [PHP] Checking for internet connection.

2009-12-23 Thread Kim Madsen
Kim Madsen wrote on 23/12/2009 17:01: Okay, explanation excepted, E-mails can easily be misunderstood :-) May you have a merry Christmas (grab another cup of choco, just in case ;-)) correction: accepted Now _I'M_ gonna get a cup of chocolate :-) -- Kind regards Kim Emax - masterminds.dk

Re: [PHP] Checking for internet connection.

2009-12-22 Thread Daniel Brown
On Sat, Dec 19, 2009 at 19:13, Angus Mann angusm...@pobox.com wrote: Hi all. I'w writing a PHP app that is designed to run over a LAN, so internet connection for the server is not really essential. Some users may deliberately not connect it to the internet as a security precaution. But I'd

Re: [PHP] Checking for internet connection.

2009-12-22 Thread Andy Shellam
Both at home and at work there are caching DNS on the LAN. So a DNS request may come back with a valid IP address when the WAN connection is down. I still won't be able to connect to the remote site. Dig an external server - e.g. dig @a.root-servers.net google.co.uk If your net is down the

Re: [PHP] Checking for internet connection.

2009-12-22 Thread Stuart Dallas
On 21 Dec 2009, at 19:40, Andy Shellam wrote: Both at home and at work there are caching DNS on the LAN. So a DNS request may come back with a valid IP address when the WAN connection is down. I still won't be able to connect to the remote site. Dig an external server - e.g. dig

RE: [PHP] Checking for internet connection.

2009-12-22 Thread Bob McConnell
From: Andy Shellam Both at home and at work there are caching DNS on the LAN. So a DNS request may come back with a valid IP address when the WAN connection is down. I still won't be able to connect to the remote site. Dig an external server - e.g. dig @a.root-servers.net google.co.uk

RE: [PHP] Checking for internet connection.

2009-12-22 Thread Ashley Sheridan
On Tue, 2009-12-22 at 08:27 -0500, Bob McConnell wrote: From: Andy Shellam Both at home and at work there are caching DNS on the LAN. So a DNS request may come back with a valid IP address when the WAN connection is down. I still won't be able to connect to the remote site. Dig

Re: [PHP] Checking for internet connection.

2009-12-22 Thread Kim Madsen
Bob McConnell wrote on 21/12/2009 15:05: Both at home and at work there are caching DNS on the LAN. So a DNS request may come back with a valid IP address when the WAN connection is down. I still won't be able to connect to the remote site. Then use fopen() to read a page you know exists? --

Re: [PHP] Checking for internet connection.

2009-12-22 Thread Andy Shellam
I'm confused... what's the problem with just trying to hit the update server? If you can then you check for updates, if not then you, erm, don't. Simples, no? True, I think I said this same thing in a previous post - I suggested the DNS option if all the OP wanted to do was check if an

RE: [PHP] Checking for internet connection.

2009-12-22 Thread Bob McConnell
From: Andy Shellam I'm confused... what's the problem with just trying to hit the update server? If you can then you check for updates, if not then you, erm, don't. Simples, no? True, I think I said this same thing in a previous post - I suggested the DNS option if all the OP wanted to do

Re: [PHP] Checking for internet connection.

2009-12-22 Thread Andy Shellam
And I was pointing out that this would not be a valid test when there is a caching DNS on the LAN. I also pointed out how to avoid caching issues - the comment was aimed at the author of the message before mine. Too much of the conversation and most of the attribution was stripped too

RE: [PHP] Checking for internet connection.

2009-12-21 Thread Bob McConnell
From: Andy Shellam By attempting to connect you will implicitly query DNS (which itself is a connection to server). No it's not - it's putting out a packet targeted at an IP address and hoping a server will answer - hence why multi-cast works for DNS because you're not directly

Re: [PHP] Checking for internet connection.

2009-12-20 Thread Andy Shellam
I think the only way to detect if it can connect to the Internet is to see if you can grab a file from somewhere on the Internet. I'd hazard a guess that when operating systems are able to tell you they can connect to the Internet they are actually saying they can ping a predetermined

Re: [PHP] Checking for internet connection.

2009-12-20 Thread LinuxManMikeC
On Sun, Dec 20, 2009 at 2:32 AM, Andy Shellam andy-li...@networkmail.eu wrote: I think the only way to detect if it can connect to the Internet is to see if you can grab a file from somewhere on the Internet. I'd hazard a guess that when operating systems are able to tell you they can connect

Re: [PHP] Checking for internet connection.

2009-12-20 Thread Andy Shellam
By attempting to connect you will implicitly query DNS (which itself is a connection to server). No it's not - it's putting out a packet targeted at an IP address and hoping a server will answer - hence why multi-cast works for DNS because you're not directly connecting to a specified

[PHP] Checking for internet connection.

2009-12-19 Thread Angus Mann
Hi all. I'w writing a PHP app that is designed to run over a LAN, so internet connection for the server is not really essential. Some users may deliberately not connect it to the internet as a security precaution. But I'd like the app to make use of an internet connection if it exists to

Re: [PHP] Checking for internet connection.

2009-12-19 Thread Ashley Sheridan
On Sun, 2009-12-20 at 10:13 +1000, Angus Mann wrote: Hi all. I'w writing a PHP app that is designed to run over a LAN, so internet connection for the server is not really essential. Some users may deliberately not connect it to the internet as a security precaution. But I'd like the

Re: [PHP] Checking for internet connection.

2009-12-19 Thread Angus Mann
Why can't you put the update on the same LAN server that the app resides? If that is not possible, what about using CURL, and update if it can connect successfully, but don't if it cannot? Thanks, Ash http://www.ashleysheridan.co.uk Since the LAN is remote (many

Re: [PHP] Checking for internet connection.

2009-12-19 Thread Ashley Sheridan
On Sun, 2009-12-20 at 10:36 +1000, Angus Mann wrote: Why can't you put the update on the same LAN server that the app resides? If that is not possible, what about using CURL, and update if it can connect successfully, but don't if it cannot? Thanks, Ash

Re: [PHP] Checking for internet connection.

2009-12-19 Thread John Corry
Curl_init() will return a resource or false if it fails, like it would if no Internet connection were present. J Corry Sent from my iPhone On Dec 19, 2009, at 5:36 PM, Angus Mann angusm...@pobox.com wrote: Why can't you put the update on the same LAN server that the app resides? If

Re: [PHP] Checking for internet connection.

2009-12-19 Thread Phpster
The next way to handle this might be to code an AIR app. Then it's a simple js trap to see if connectivity exists. Bastien Sent from my iPod On Dec 19, 2009, at 7:13 PM, Angus Mann angusm...@pobox.com wrote: Hi all. I'w writing a PHP app that is designed to run over a LAN, so internet

Re: [PHP] checking for internet connection

2005-07-22 Thread Richard Lynch
On Wed, July 20, 2005 12:49 am, Steven said: I am looking for a simple way to check if the server is connected to the Internet, they use a dialup to get Internet connection, and I need to email reports out, but want to check to see if the user remembered to connect to the Internet first. If

[PHP] checking for internet connection

2005-07-20 Thread Steven Sher
Hi I am looking for a simple way to check if the server is connected to the Internet, they use a dialup to get Internet connection, and I need to email reports out, but want to check to see if the user remembered to connect to the Internet first. If anybody has a nice script, or just a

[PHP] checking for internet connection

2005-07-20 Thread Steven
Hi I am looking for a simple way to check if the server is connected to the Internet, they use a dialup to get Internet connection, and I need to email reports out, but want to check to see if the user remembered to connect to the Internet first. If anybody has a nice script, or just a

Re: [PHP] checking for internet connection

2005-07-20 Thread James
PROTECTED] To: PHP General php-general@lists.php.net Sent: Wednesday, July 20, 2005 3:49 AM Subject: [PHP] checking for internet connection Hi I am looking for a simple way to check if the server is connected to the Internet, they use a dialup to get Internet connection, and I need to email reports