I save the stats in a scriptdata folder. Is it possible to show these stats on a website? Or can this only done with mysql database?
I save the stats in a scriptdata folder. Is it possible to show these stats on a website? Or can this only done with mysql database?
Probably doable, but mysql is a far superior option.
"Does not work" is an error report for a bug between keyboard and chair.
All hail Artie Effem
Ni3ls (18th March 2016)
Basically you can just do echo file_get_contents("/home/niels/cod2/whatever_fs_game/scriptdata/$guid.txt") and then parse the data with explode() to prettyprint it.
Make sure your www-data can access your stats-folder, every folder needs the "x" for "all", like:
But you will lack the ability to search through the player data or make stats e.g., pretty dumb stats printing only by a list of guid's.Code:chmod a+x /home chmod a+x /home/niels chmod a+x /home/niels/cod2 chmod a+x /home/niels/whatever_fs_game chmod a+x /home/niels/whatever_fs_game/scriptdata # last one needs to be readable aswell to get the *.txt list e.g. with glob("/home/niels/whatever_fs_game/scriptdata/*.txt") chmod a+r /home/niels/whatever_fs_game/scriptdata
Perfect is the enemy of the good, so just go for it, till you master MySQL :^)
timescale 0.01
Ni3ls (18th March 2016)