Jump to content

Auto Update


Joshua F

Recommended Posts

Hello, I am making a Status Page for servers in general. It has Uptime(In %) and Status(Online/Offline).

 

I have a database it loads this from, (Failed, Success, and Status)

Here's an example of how it works.

Failed = 0
Success = 1
Php code calculates the uptime, and prints 100%
Status = 1
Status: Online

 

What I am trying to do, it make the site run through Hosts and Ports at the same time, and update the databases with the updated info.

 

Example

It updates, and Google was offline.
Failed = 1
Success = 1
Calculates the uptime to 0%
Status = 0
Status: Offline

 

Any way of doing this easily, because this will be something I might release to the public, and I want it user friendly.

 

P.S. This is will be using fsocketopen.

Link to comment
Share on other sites

I'm asking how to make a script tha will run every 5 mins or so, or something that does that, and is user friendly, and will check to see of the server is online or not. Which it will get the host and the port from the database, and will update the database with the new info.

 

Sorry if that's confusing, I just typed this on my phone.

Link to comment
Share on other sites

I'm asking how to make a script tha will run every 5 mins or so

 

Google "Cron Job" and see if that's what you mean, from the description that'll float your boat - assuming that you are on a host server and not a localhost scenario.

 

Rw

Link to comment
Share on other sites

It's kinda self explanatory, I would just check through your control panel to see if they offer that feature, I just checked mine, and it comes under 'advanced features', (I use Direct Admin) then you just select the script you want to run, and the interval you wish to run it at, and how often.. Simple!!

 

Rw

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.