I don't know much about this sort of thing, but am starting to research it since I need something similar (random user from ones logged in last week/month).
In theory, you should be able to run a query that will query all the users online at a particular time. In fact, this is already being done by the who's online, so it's just a matter of taking all those user numbers putting them into an array and then selecting a random element from that array, which would correspond to a random user. You could probably even make a cron job that will automatically run the script and email you the username.
|