maximator5 Posted March 16, 2009 Share Posted March 16, 2009 Hello and thank you for you're time! I am developing a pbbg and I have a few issues: 1) How can I display the current users connected (ONLY the users logged in, not all the IP's connected to the site). 2) How can I do a code to display the ranking for the users (in the users table, the name is stored and on a different table, stats, the level and cash [just an example] is stored). 3) How can I display a current users online (not a number of total like in my first issue), with the name and level... something like this: Online Players: MaximatoR (Level 5) | John (Level 10) | etc. . Thank you again for you're time given ! Link to comment https://forums.phpfreaks.com/topic/149674-some-simple-i-think-codes-please-help/ Share on other sites More sharing options...
syed Posted March 16, 2009 Share Posted March 16, 2009 What is pbbg? Link to comment https://forums.phpfreaks.com/topic/149674-some-simple-i-think-codes-please-help/#findComment-785967 Share on other sites More sharing options...
maximator5 Posted March 17, 2009 Author Share Posted March 17, 2009 Well, the ideea of a PBBG is that is a browser based game that it's played online on a web-site by many players and last for more than one round. In other words, it's an online web-site game. PBBG = Persistent Browser-Based Game Link to comment https://forums.phpfreaks.com/topic/149674-some-simple-i-think-codes-please-help/#findComment-786698 Share on other sites More sharing options...
monkeytooth Posted March 17, 2009 Share Posted March 17, 2009 simple no, not exactly.. depends on the exact way you have the tables set up, what the unique identifier is for the rows of the table so you know what rank goes with what user.. getting the number of online users.. is not an exact science but to get a general count I would say set up another table with ip's or usernames if they have to log in, and track the motion everytime the user moves around the site they stay active and update the table that tracks them with a timestamp or something and then you take the timestamps and have it check against the current time, any timestamps that fall active within the last x mins would count as a active member any not active or active longer then x ammount of mins is inactive.. as far as displaying the information it all depends on what you pull how you pull it and then how you want to display it. Unfortunately as little as this makes sence the possibilities are for a lack of better words endless. Link to comment https://forums.phpfreaks.com/topic/149674-some-simple-i-think-codes-please-help/#findComment-786831 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.