Page 1 of 1

Send a user to another page by clicking a link - kick user

Posted: Mon Mar 08, 2010 8:30 am
by buckneri
Currently working on a chat website and i am trying to figure out how to allow an admin to click a link and send a particular member to another page. Mainly this is to kick a user out of a chatroom.

This is only for members of the site, so i will be using a database to pull which user to be kicked. The page they will be sent to is constant (kicked.php)

Any database functions i can probably figure out and code. I just dont know if there is a way to actually kick a specific user off a page by clicking a link. I know it can be done, since the function exists in chatrooms, just not this one.. yet. but im not sure if i can do it in php or if i need to tap into javascript, ajax, or something else.

Any help is greatly appreciated.

Jason

Re: Send a user to another page by clicking a link - kick user

Posted: Mon Mar 08, 2010 10:31 am
by AbraCadaver
Well for a chat web site there is most likely some client side javascript that checks the server periodically for new messages yes? So modify the javascript so that if it receives a special code instead of a message, act on that code. If the code is kick then use the javascript to redirect to the kicked.php page.

Re: Send a user to another page by clicking a link - kick user

Posted: Mon Mar 08, 2010 3:17 pm
by buckneri
The chat room is flash based and action script 3 and i'm not so hot with flash. I was hoping to populate a members list on the page that it is embedded in, that way i can use php or something to do this whole kick task. Im starting to think i am going to have to learn action script 3 and do it in there. The main reason i want to keep it separate is that at some point i want to separate the cam from the chat room, and have just the video in flash and the chat room in php to reduce the server load on my flash server.