Player caching script for Minecraft servers
- Cache multible servers
- MySQL Database backend
- Fully HTML Formatted, with option to render without html
- Easily view player caches
PHP 5.3.X, MySQL 5.6.X, crontab/schtasks
Optional: Apache 2, IIS 7
Installing MySQL & PHP
On Red Hat-based distributions:
yum install mysql-server mysql
yum install php php-mysql
On Debian based systems such as Ubuntu:
apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt
On Windows bases systems:
I highly reccomend using either XAMP (http://www.apachefriends.org/en/xampp.html)
or WAMP (http://www.wampserver.com/)
-
Paste the script files into the directory they will be ran from
-
Create a MySQL Database for the script and import
structure.sql
-
Edit the variables in
includes/configuration.inc.php
to suite your needs -
Edit crontab (Linux systems) As the server user you're running the script as:
crontab -e
Add these lines:
#m h dom mon dow command */5 * * * * php FAKEPATH/cache/cache.php ALL 0 0 * * * php FAKEPATH/cache/averages.php ALL
-
Edit schtasks (windows systems) Open CMD (Command Prompt) and type:
schtasks /create /sc minute /mo 5 /tn "MCCache" /tr "PHP_PATH FAKEPATH\cache\cache.php ALL" schtasks /create /sc hourly /mo 23 /tn "MCCache" /tr "PHP_PATH FAKEPATH\cache\averages.php ALL"
The simplest way to view cache data is in the web browser using Apache or IIS
However cach data can be viewed from console by typing the following (i reccomend having no_html set to true):
-
Windows
PHP_PATH FAKEPATH\index.php SERVER_NAME
-
Linux
php FAKEPATH\index.php SERVER_NAME