PDA

View Full Version : Question about PHP and ElectroServer



EgoAnt
06-25-2004, 06:28 AM
I'm still fairly new to Electroserver and I had a question, is there any way to poll the server from PHP to find out how many people are logged in? I'd like to be able to add people to a waiting list if the server had reached its limit and then have them bumped in automatically when their turn comes up. This would allow users to play single player games while they waited for an opening.

Obviously my ultimate goal would be to just buy the unlimited server, but since the site may never actually turn a profit I doubt I'll be able to afford more than the 50 concurrent license. :lol:

jobem
06-25-2004, 06:48 AM
Hi EgoAnt,

I really wouldn't worry about exceeding your limit. Even on a lot of medium sites getting more than 50 users to chat/play multiplaeyr games at a time is not that likely. Its always a popular service, but to get that many people at once requires something really really popular :)

My suggestion would be to cross that bridge if you come to it.

ps. To answer your question though, no there is no way for PHP to talk to the server. But you could write a server plug-in that would output a text file every once and a while containing the # of people connected.

EgoAnt
06-26-2004, 09:08 AM
Thanks Jobe! That's a great idea. Kind of sad to think that the site might never have more than 50 people in at once, but you're right, I should just hold off until I know it is necessary, I just like to get these things planned out just in case.

jobem
06-26-2004, 10:52 AM
I'm not saying that you can't get more than 50 at a time :) Just that it's unlikely that you'd reach that limit soon. And you could upgrade at any time.

Anyway, we are happy to help with any issues that you have.

peterblaze
07-15-2004, 05:45 AM
Hi EgoAnt,
With new ES class methods in ES 3.5 You can now get number of currently logged user in all zones without using external script.
Simple test script:

es.loggedInUserCountUpdated = function(num_logged_in) {
trace(num_logged_in);
};
es.getLoggedInUserCount();

Peter