Jacen Posted April 5, 2015 Report Share Posted April 5, 2015 So I'm just looking for a simple script that prints the amount of players on a server. If theres 40 in-game it will print 40 on the webpage. Pretty sure this could be done as Ive seen other servers have it. Also hopefully it would be possible to grab players from 4 servers, merge the number and print the result? Link to comment Share on other sites More sharing options...
vbawol Posted April 5, 2015 Report Share Posted April 5, 2015 Here is an example I just made using PHP:https://github.com/EpochModTeam/Epoch/blob/master/Tools/PHP/GetOnlinePlayers.php Redis is basically programming language agnostic so, if you are more familiar with another language there is likely to be support for it.http://redis.io/clients Link to comment Share on other sites More sharing options...
Richie Posted April 5, 2015 Report Share Posted April 5, 2015 Cheers Awol :) It won't help the OP though, this is the A2 section so he's using Sql :p Link to comment Share on other sites More sharing options...
vbawol Posted April 5, 2015 Report Share Posted April 5, 2015 lol doh, it is not that simple to do with A2 Epoch. Link to comment Share on other sites More sharing options...
Richie Posted April 5, 2015 Report Share Posted April 5, 2015 I know the answer is here somewhere, Cen posted a link to the code he uses, I just can't find it. also has some options though. Link to comment Share on other sites More sharing options...
Jacen Posted April 5, 2015 Author Report Share Posted April 5, 2015 Here is an example I just made using PHP:https://github.com/EpochModTeam/Epoch/blob/master/Tools/PHP/GetOnlinePlayers.php Redis is basically programming language agnostic so, if you are more familiar with another language there is likely to be support for it.http://redis.io/clients So my website is hosted through a Linux server, do I just install the Redis packages, then this script will work. Sorry I do a small amount of backend PHP work but I'm no professional. :D Link to comment Share on other sites More sharing options...
Richie Posted April 5, 2015 Report Share Posted April 5, 2015 So my website is hosted through a Linux server, do I just install the Redis packages, then this script will work. Sorry I do a small amount of backend PHP work but I'm no professional. :D No, Redis is for A3 and you've posted in the A2 section, that means Awols code won't work because A2 uses Sql, try my link instead. Link to comment Share on other sites More sharing options...
Jacen Posted April 5, 2015 Author Report Share Posted April 5, 2015 Oops, I derped. :) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now