ALKINDAS DayZ Website Stats

ALKINDA

Valued Member!
Okay to start this is for websites which can access a database and pull certain information and display it. I have pre configured it to display many different things. I will explain how to install and how to use this as best I can.

Ok so first there is a few things you will need to know. There is a few ways to get this done, but overall you SHOULD make a seperate database on a diff server than your dayz server, then back up your tables which you need for information (survivor, profile) every 4 hours to the new database. (you will need to create a scheduled backup somehow, i used navicat to do this). To have the website pulling off the live database could be bad, and people could abuse this so be warned, its a pain in the ass to get the backup working but you can do it!


ok so the first file you would want to make is an index.html (if you have not already). This file should be in the ROOT of your webserver, usually in www or public_html. inside that file put this

  • Index.html
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
 
<body>
 
<center><iframe src="playedcount.php" width="220" height="200px" scrolling="no" frameborder="0"></iframe>
<iframe src="murdercount.php" width="220" height="200px" scrolling="no"frameborder="0"></iframe>
<iframe src="mostdeaths.php"  width="220" height="200px" scrolling="no"frameborder="0" ></iframe>
<iframe src="longestplayed.php"  width="220" height="200px" scrolling="no"frameborder="0"></iframe><br><br>
<iframe src="recentplay.php" width="99%" height="300px" scrolling="yes" frameborder="0"></iframe>
<br><iframe src="stats.php" width="100%" height="30px" scrolling="no" frameborder="0"></iframe><br>
<iframe src="search.html" width="99%" height="250px" scrolling="yes" frameborder="0"></iframe></center>
 
</body>
</html>
As you can see i am using Iframe which inputs a certain file at a certain location. I am using PHP scripts to gather the information for these stats.

you will need now to create a connection script( i included in zip file but still need to change it to connect to your database!).

  • database.php
Code:
 <?php
$host="changeme"; // Host name
$username="changeme"; // Mysql username
$password="changeme"; // Mysql password
$db_name="changeme"; // Database name
?>

This database.php file will serve as a protectant i guess, havent really learned why but its better than inputting it directly into your scripts. secondly you need to input your mysql server information here.

now you will need to input these php files into your root directory where everything above has been placed. ALKINDAS Website Stats.Zip
These files include all php scripts (playedcount.php,murdercount.php,recentplay.php,stats.php,search.html,database.php,longestplayed.php,mostdeaths.php and search.php)


If anyone knows somthing i have done incorrectly or if i could have done somthing different, please let me know :)

*edit* if you want to display less chars in the names you can go into each php script and look for
Code:
$length = '15';
and change 15 to how many chars you would like. i use a custom one on my server which takes out certain clan tags so it will only show their name and a ... either before or after their name where the clan tag was. this is teidious because i have to add an if statement for each new modification.

Test it out on my website at WWW.DayZFunHouse.com/stats . its pretty much the exact thing, you can alter the colors pretty easily in the php scripts.
 
Back
Top