SWBF PHP Stats

Well this basically does the same thing as the previous version only this is an update. Heres a quote from the original file. Here...

Download

Uploading...
Do not refresh or leave this page!

File Description

Well this basically does the same thing as the previous version only this is an update. Heres a quote from the original file.

Here is a small script that will allow you to display stats from yours or another server via PHP website! Download now and enjoy!

~~Xander

Read More

Readme
######################################################################################################
READ ME

Anything can be modified in this system but please leave the copyright and drop me an email with a link if you 
do mod it.

Thanks
-=SLOA=- NaTaS
natas@apocalypce.net

Ok you have all asked for it so here it is..........
SWBF Game Stats -> inconjuction with SWBF Server Status

WINBLOWS instructions can be found in the CMD_FILES directory

###########################################
		WARNING
###########################################

This script has not been tested on WINBLOWS machines as of yet. It works 100% on Linux RH 9.0 with PHP, MySQL and Apache

###########################################
		WARNING
###########################################









###########################################
INSTALLING 
###########################################

Ftp the swbf_php_stats.tar.gz up to your web server.
gzip -d swbf_php_stats.tar.gz
tar -xvf swbf_php_stats.tar

Now that you have the files all extracted lets make some modifications.

### SQL CHANGES ###
go to the SQL directory
open swbf_stats_php.sql
Look for the line that states

INSERT INTO servers VALUES (1,'0.0.0.0',3658);
Then change the 0.0.0.0 ip address to the server ip address of your game server.

Now that you have modified the sql file you can add the db and tables to your database.
If you are using PHPMyAdmin then just copy the syntax to the query tool and run it.

If you have shell access to your db server you can use the MySQL readfile command
mysql -u username -p < /PATH/TO/FILE/swbf_stats_php.sql


#### CONFIG CHANGES ###
Now go to the includes folder and open conn.php
Modify the following lines in conn.php

$dbname = &quot;DBNAME&quot;;			# DB Name      : the database name
$dbhost = &quot;DBHOST&quot;;			# DB Host Name : useally localhost if the db is on the same server as the web site
$dbuser = &quot;DBUSER&quot;;			# DB User Name : the name of the user to access the database
$dbpass = &quot;DBPASS&quot;;			# DB Password  : the password to access the database

Change the $dbname to your database name (ex. $dname = &quot;TESTING&quot;;)
Change the $dbhost to your database hostname (ex. $dbhost = &quot;localhost&quot;;) Localhost is usally the correct one unless your database is hosting on a different server from your web site
Change the $dbuser to your database username (ex. $dbuser = &quot;SWBF_TEST&quot;;)
Change the dbpass  to your database users password (ex. $dbpass = &quot;SWBF_TEST_PASSWORD&quot;;);


Once you have completed the install of the db and the mod to the conn.php file you can go to your web site and use the admin interface to modify someother settings.
http://www.yourdomain.com/swbf_php_stats/admin/index.php

You will be prompted for a username and password, if you did not change the username or password in the sql file they are
USERNAME: admin
PASSWORD: adminpass

I do suggest you change these ASAP due to this could be a security hole if you do not.

click on Modify Stats Settings and you are able to modfiy the page title, the header title, and the number of games a player has to play before they are displayed in the main stats
disply.

You can can also modify your Game Server IP and Port number.

And I will say it again modify your admin username and password...........

If you go to Database Info you can clear your stats system with Clear all tables but it will kill any stats that you have accumilated.
There is also Clear Temp Table which will clean up your temp table. I recomend doing this once in a while.


No due to SWBF still has not come out with an useful log on the server you will have to setup a cron for the getstats.php file otherwise you will not have any stats in your system.

To do this use this command
Example:
*/1 * * * * USERNAME php -q /DIRPATHTOWEBSITE/swbf_php_stats/getstats.php > /dev/null


Once you have the cron setup you can start gathering stats.


######################################################################################################

Read More

Comments on this File

There are no comments yet. Be the first!

-=SLOA=- NaTaS


50 XP


Registered 20th October 2004

2 Files Uploaded

Share This File
Embed File