Event driven php script for sound

I am wandering if some knows of an event driven php script that plays a sound when certain event happends. What i mean is that when some gets so many post a sounds is played when the page is refreseshed. So does anyone know about anything like that?