Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
09-25-2013, 03:12 PM #1
- Join Date
- Sep 2013
- Thanked 0 Times in 0 Posts
Will java help me with online mafia games
Hello. I apologise in advance as this could be the complete wrong place to be speaking about this. I have a very stressful job, and when I can I play a gangster game on the internet, purely text based and php coded. I already have a script running on the game which allows me to captcha every user that comes online and takes a list of the users online every 10 mins. When these builld up I have a lot of names. I was wondering if there was something I could do, or make, which allows me to put all the names in, so it sorts them out. For example, it will put all dead accounts and below a certain rank in one list, and the rest in another list. This way it saves me hours and hours of many power to do it all by hand. Sorry this might be the wrong place and it might not make sense, but I'm trying to word it so people who do not play the game understand. I would appreciate the help if possible, ty
09-25-2013, 03:50 PM #2
- Join Date
- Sep 2002
- Saskatoon, Saskatchewan
- Thanked 2,668 Times in 2,637 Posts
I don't understand the question, nor where Java comes into this.
You can do all you're asking for using the server side language already in use. By dead accounts, I assume you mean no longer active in session, not accounts that are inactive since they have no relevance.
In order to do what you want, you'll need to either:
Write custom session handlers and preferably a dbms to store them in. This lets you select where newer than a certain age, and order them. It also allows purging.
Or: write a custom parser for the existing PHP sessions. Iterate a *custom* directory (do NOT use the default location for sessions; that can get you in a lot of trouble on a shared host) where you store your sessions, and read and parse every session file. This will let you read the user information out of it to build the list. Do not be tricked into believing that PHP session files are standard serialized - they look like they are, but they are not. You can use the WDDX setting though, which can be used in conjunction with wddx_deserialize making it a lot easier.
header('HTTP/1.1 420 Enhance Your Calm');