维护活动用户列表并在webhost上检索它

first - I'm absolute beginner with web back-end stuff!

I'm looking for the most simple way to achieve the following:

  1. on the web-host: maintain a user list (doesn't have to be persistent, if the server is rebooted)

  2. allow a client to add it's name to the user list

  3. allow a client to receive the user list

my clients are flash-players but this doesn't really matter. if my web-host would support running servlets, i would create a simple java socket-server - but my web-host allows only PHP and MySQL databases.

Is it possible to do this with php only without the use of a MySQL database?

If the webhost has ACP installed, you can use it to keep the list in memory between page invocations:

apc_store("userlist", new ArrayObject($active_user_list), $ttl);


$temp = apc_get("userlist");
if (isset($temp) && $temp !== false) {
    return $temp->getArrayCopy();
}
return null;

If no PHP cache is not installed, you will need to write the user list to a mysql table.