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.

Did you know?Explore Trending and Topic pages for more stories like 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

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

RSS poster script?
I have found a script that posts RSS's for me on a site that I'm building. However I would like to a

Checking if field is empty AND using !is_numeric
Hi lads,

Need to be able to display an error message (using isset?) that says "Cant lea

Change image filetype on upload?
Hi,
I've got a form which uploads an image to the server.
Is it possible to change the image t

Parse error: syntax error, unexpected T_ELSEIF in /home/......html/item.php on l
I do not know what is wrong with this. Hope some one can help. I do nto want to post the entire site

array ...
hi
Code: function formatCategories($categories, $parentId)
{
// $navCat stores all child

Setting/Modify Headers using mail() function
I have a question about setting email headers when using mail() in a php script.

When I send

phpMailer will not connect using SMTP
I am trying to use phpMailer with smtp:

Code: [Select]$mailer = new PHPMailer();
$mailer-&

defining website tags
Hi,

What would be the best way to define tags for my site, such as website title, url etc.

Insert data in Mysql and move to another page
I'm stuck with this simple problem. I need to insert data in Mysql and then hit submit and move to a

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