Check something, wait, check again, do something!


Posted on 16th Feb 2014 07:03 pm by admin

Hi guys.

I wonder if someone can help me with this.

Basically, what I want to do is (for arguments sake I will use google.com as an example) check to see if google.com is alive. If its alive, I want it to stop and exit. If its not, I want it to wait a defined amount of time (say 30 seconds) and then check again. If its up this time, I want it to exit, however, if tis still down, I want it to do something (ie send an email).

Any help would be much appriciated.
Thanks

No comments posted yet

Your Answer:

Login to answer
178 Like 41 Dislike
Previous forums Next forums
Other forums

Session is not saving
I am not trying to do anything too fancy, I am just trying to get some $_SESSION data to save and us

DATEDIFF Question
First time post, and of course it is a help question.

I am using a WP plug-in to display prev

Login Script Issues
I am using a script I got from http://phpsense.com/php/php-login-script.html in order to allow peopl

Using two $_POST Function / Switch () statements, second does not work.
Hi all. I’m new to php and am having a problem getting $_POST Function / switch () to work. I

onClick='location.href=index.htm'> not working
Below is my code:

echo "<input type='button' value='redirect' onClick='location.h

max function question
Hi All
Ihave a table that holds shipment numbers and dates like this

select * from

Image loading
Hi Developers,

I'm trying to display an image from images/image.gif getting the url from mysq

Embedding flash object in Else statement
This is my first major project in PHP and I'm having some trouble embedding a flash object in an Els

RadioButtonList data selection
view plaincopy to clipboardprint?

Calculating n! using vector
#include
#include
#include

using

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash