Thanks for the reply,
I've looked through the flashmog files but I dont think it has a possible solution to my problem. I can get the chat to run ok i'm just trying to find a way of getting a message in the chat containing both the text and the username. I thought of a possibly simpler method of doing this yesterday whereby I send the username from flash inside the message and then use the explode function to extract it and add it seperately to the message, something like this:
function send_Message($allclient, $socket, $msg) {
foreach($allclient as $client) {
$extracted = explode("|", $msg);
$finalmsg = "$extracted[1]: $extracted[0]";
socket_write($client, $finalmsg);
}
}
So basically the flash file sends php something like "random message|some user" and php seperates the two and outputs it to all users.
Now I know it isn't a problem with the rest of my script, if I just socket_write the $msg it works perfectly, but when I try adding this flash gives me a weird output that makes no sense, here's an example of what I get if I send 4 messages containing hello:
User
: hello
User
: helloUser
: helloUser
: helloUser
Any ideas what i've done wrong? 🙁