mercredi 29 juillet 2015

[Mod] Server Extension Webpage

I made a little java program to extract the playerstats and save them to a database and also a webpage to view the stats.

What you need to run this:
  • computer where you can execute the java program
  • mysql-database (5.5 or higher)
  • a webspace or something like this with php
MySQL:
Create a new database with any name you would like (you will have to enter this name into the config files later).
Import the kf2stats.sql which you can find in the uploaded ServerExtWebMod.rar.

PHP:
Open the Webpage/secret.php and enter:
  • hostname at $mysql_host
  • port which will be used to connect to the MySQL server at $mysql_port (3306 is the standard port)
  • username to access the MySQL server at $mysql_user
  • password to access the MySQL server at $mysql_pass
  • database name which you created at the beginning at $mysql_db

To show the webpage use .../kf2stats.php?page=0&count=25

Java Program:
Open the USAConverter.ini and enter:
  • directory where your .usa file are at Directory (always use \\ for the folders instead of a single \)
  • hostname where your MySQL server runs at Hostname
  • port which will be used to connect to the MySQL server at Port (3306 is the standard port)
  • username to access the MySQL server at Username
  • password to access the MySQL server at Password
  • database name which you created at the beginning at Database
  • how frequently it should update the database at UpdateTimer in seconds (default here is every hour).

DON'T CHANGE LastUpdate. It saves the time when the database was updated so it only updates active users next time.

The initial run when i tested it took around 8 minutes for over 3000 users with 9000 stats and 4000 traits.






Download: here

Credits:
Sheep - for sharing the stat files from his server.
Marco - for the Server Extension Mod.


[Mod] Server Extension Webpage

Aucun commentaire:

Enregistrer un commentaire