View Full Version : [Question] ES5 and php
12-09-2010, 05:15 PM
It is possible to "read" the ES5 status and variables with php?
I just want to make a php login and I want to add an additional control like "if user is already logged in some zone then throw an error" before the start of my flash app (for bandwidth preserving).
12-09-2010, 05:46 PM
I don't know about PHP. You can certainly get the info via JMX. The least amount of bandwidth is quite likely going to be having a very lightweight flash app that does a guest login that then asks a server level plugin whether UserNameX is currently logged in.
What a lot of applications do is have a LoginEventHandler that checks for the username already being logged in, and if so, evicts that user from the server - because in many cases that user is a ghost due to a dirty disconnect.
Another option available is to have your LoginEventHandler periodically drain a queue of usernames into a post to your database, and a LogoutEventHandler that similarly drained a queue of users who just logged off. This would lead into even more cases of dirty disconnects leaving ghosts in the database however, so I wouldn't recommend it.
One project that I worked with did a two stage login process, using a very lightweight AS3 swf. Quick no database login with an evict of the other user if the user name exists, followed by a server level plugin request that would do the database lookup. If the database says "don't let him log on" then evict this user from the server, otherwise mark him as legit and then the client loads the larger swf so that the user can start playing games.
Powered by vBulletin® Version 4.1.6 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.