How to run my PHP code every X minutes?

I am trying to make a “status monitor” for our small network. After loading the page, I ping for each IP address that I added. Everything is fine. But I would like to do this ping for every X minutes without reloading my page with holes.

I can do this if I reload the header update page, but I would like to do this witout reload.

I think I need to do this with AJAX ?, but I don’t know how ..

thank

+5
source share
5 answers

, , , php DIB . , jquery.

0

Nagios - :

1) - .

2)

3) , , ping

4) - ,

5) , .

6) SLA

7) Nagios ,

8) , , , .

.

+2

, cron

ajax (, jquery ajax jquery timer), , ajax , .

http://plugins.jquery.com/project/timers

+2

" ", COMET, , PHP.

"ping" .

, , , . , .

In web development, Comet is a neologism for describing a network application model in which an HTTP request allows a web server to transfer data to a browser, without the browser explicitly requesting it. Comet is an umbrella term for multiple methods of achieving this interaction. All of these methods rely on features enabled by default in browsers such as JavaScript, rather than on plugins other than the default.

COMET (Wikipedia)

+1
source

Why don't you try cron?

+1
source

All Articles