Re: [PHP] Cheap Ping

2007-04-13 Thread Jürgen Wind
Jim Lucas-2 wrote: > > Richard Lynch wrote: >> On Fri, April 13, 2007 12:20 am, Jim Lucas wrote: Is there some way I can set a shorter limit? >>> http://us.php.net/manual/en/function.stream-set-timeout.php >> >> Bzzzt. >> >> That's for an already-opened stream. >> >> :-) >> > I figured

Re: [PHP] Cheap Ping

2007-04-13 Thread Jim Lucas
Richard Lynch wrote: On Fri, April 13, 2007 12:20 am, Jim Lucas wrote: Is there some way I can set a shorter limit? http://us.php.net/manual/en/function.stream-set-timeout.php Bzzzt. That's for an already-opened stream. :-) I figured that the op would figure that part out and possibly chan

Re: [PHP] Cheap Ping

2007-04-13 Thread Richard Lynch
On Fri, April 13, 2007 12:20 am, Jim Lucas wrote: >> Is there some way I can set a shorter limit? > > http://us.php.net/manual/en/function.stream-set-timeout.php Bzzzt. That's for an already-opened stream. :-) -- Some people have a "gift" link here. Know what I want? I want you to buy a CD fro

Re: [PHP] Cheap Ping

2007-04-13 Thread Richard Lynch
On Fri, April 13, 2007 12:16 am, [EMAIL PROTECTED] wrote: > Hello, > > I am trying to find a simple way to test to see if a web site > is up or not. I tried using > $file = file_get_contents("http://www.example.com/page.html";); > but when the site is down it takes too long and seems to time out

Re: [PHP] Cheap Ping

2007-04-13 Thread tedd
At 12:37 PM -0700 4/13/07, Paul Novitski wrote: At 11:16 PM -0600 4/12/07, [EMAIL PROTECTED] wrote: I am trying to find a simple way to test to see if a web site is up or not. At 4/13/2007 08:56 AM, tedd wrote: Try: if ($unix) { system ("ping -c$count -w$count $host"); system("killa

Re: [PHP] Cheap Ping

2007-04-13 Thread Gabriel Millerd
At 4/13/2007 08:56 AM, tedd wrote: Try: if ($unix) { system ("ping -c$count -w$count $host"); system("killall ping"); } slaying all the pings that the user has can bring odd results. obviously this will kill all the webserver's userid that has pings running. -- Gabriel Millerd --

Re: [PHP] Cheap Ping

2007-04-13 Thread Paul Novitski
At 11:16 PM -0600 4/12/07, [EMAIL PROTECTED] wrote: I am trying to find a simple way to test to see if a web site is up or not. At 4/13/2007 08:56 AM, tedd wrote: Try: if ($unix) { system ("ping -c$count -w$count $host"); system("killall ping"); } else { system("ping -n $c

Re: [PHP] Cheap Ping

2007-04-13 Thread tedd
At 11:16 PM -0600 4/12/07, [EMAIL PROTECTED] wrote: Hello, I am trying to find a simple way to test to see if a web site is up or not. I tried using $file = file_get_contents("http://www.example.com/page.html";); but when the site is down it takes too long and seems to time out terminating the s

Re: [PHP] Cheap Ping

2007-04-13 Thread Leonard Burton
HI I am trying to find a simple way to test to see if a web site is up or not. What about analyzing the results from "exec("ping www.domain.ext");" ? -- Leonard Burton, N9URK http://www.jiffyslides.com [EMAIL PROTECTED] [EMAIL PROTECTED] "The prolonged evacuation would have dramatically af

Re: [PHP] Cheap Ping

2007-04-12 Thread Paul Scott
On Thu, 2007-04-12 at 23:16 -0600, [EMAIL PROTECTED] wrote: > Any other suggestions? cURL. http://www.php.net/curl That will allow all the configs and stuff to be set, and you get the response in a neat variable that you can then test. --Paul All Email originating from UWC is covered by disc

Re: [PHP] Cheap Ping

2007-04-12 Thread Jim Lucas
Is there some way I can set a shorter limit? http://us.php.net/manual/en/function.stream-set-timeout.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Cheap Ping

2007-04-12 Thread ccspencer
Hello, I am trying to find a simple way to test to see if a web site is up or not. I tried using $file = file_get_contents("http://www.example.com/page.html";); but when the site is down it takes too long and seems to time out terminating the script rather than returning a false I can test. I