EOSERV Forum > Programming > PHP Uptime Script! [Release]
Topic is locked.
Page: << 1 >>
PHP Uptime Script! [Release]
Author Message
Post #141395 PHP Uptime Script! [Release]

Link: https://tehsausage.com/paste/uptimepro-60eb

Usage: 

  • Change the database & server credentials to suit your server using notepad or something similar
  • Change the access key (preferably to something hashed)
  • Access key is there just to provide some "security" I guess, to reduce flooding to your database
  • Add this in your restart.bat for your server: "C:/path/to/php.exe C:/path/to/uptime.php?accesskey=youraccesskey"
  • if you do not own a restart.bat file, either type the above command into CMD obviously using the correct directories or browse to the php document on your web server.
  • it is advised you set up an uptime.bat file and call that with windows scheduled tasks as often as you deem necessary to maintain accuracy of the output.
Features
  • alters the EOSERV database that you should already have set up if you own a MySQL backed server, to store the uptime information automatically
  • stores when the server was started (if the server has already been started before you have a first time run of the script, accuracy will be compromised)
  • stores when the server was stopped (as above)
  • generates uptime in years, months, days, hours, minutes and seconds
  • requires an access key to keep flooding of your webserver/database to a minimum 
This script was originally developed for redrocco, free for public use. Please report any bugs or questions, thanks!
---
If money doesn't grow on trees, then why do banks have branches?
14 years, 8 weeks ago
Post #141400 Re: PHP Uptime Script! [Release]

I'm already using this ;D Thanks Scott.

14 years, 8 weeks ago
Post #141410 Re: PHP Uptime Script! [Release]

Might want to explain the "C:/path/to/php.exe" to some of the newbies. If im guessing correctly, you mean the main php executable, for the web server. Good work on this tho :P

---
Andrewbob - I would be on the fucking copter of rofls

Programmer, Web Developer, and Graphics Designer
14 years, 8 weeks ago
Post #141413 Re: PHP Uptime Script! [Release]
Wildsurvival posted: (30th Apr 2012, 09:42 pm)

Might want to explain the "C:/path/to/php.exe" to some of the newbies. If im guessing correctly, you mean the main php executable, for the web server. Good work on this tho :P


was wondering how long it'd take you to comment ;) XD but in all honesty I doubt "newbies" would even know what a webserver is :P but for those that do have a web server and are wanting to use this: Take this for an example.
You have the XAMPP web server bundle in the directory "C:/xampp" you'll need to browse to the location where "php.exe" (the main executable file for interoperating your PHP documents) is stored, and taking note of that for the bat file as mentioned
---
If money doesn't grow on trees, then why do banks have branches?
14 years, 8 weeks ago
Page: << 1 >>
Topic is locked.
EOSERV Forum > Programming > PHP Uptime Script! [Release]