Users Online

How would I make a script using Flash and PHP that would name the users that are online. Like there names would popup in a box. How would I go about doing this?