I'm working on a forum with Apache2-PHP-MySQL and i wonder if there is any way that i can get an alert (sound maybe) when
when a user logs in or
when a user publishes a post.
I think this has something to do with HTTP server or MySql
Thanks
whats the software, is it your own?
yes. I'm on the servers side. (if that's what you asked) it is a simple forum site I created myself.
Sure - anything's possible, given appropriate use of appropriate tools. I can think of several ways to do this, though none of them are elegant:
Set up the machine doing the beeping (your home computer, I'd imagine) with a fixed IP, so the web server can connect to it. (Many ISPs offer fixed IPs for an additional monthly charge.) Add code to your web app to open a connection to your machine and sends a message when the desired conditions are met (you can use whatever protocol you like, but HTTP is probably easiest). Finally, write a small application (not PHP - probably something like Java or Vš that runs in the background on your home computer, monitors incoming HTTP requests, and makes appropriate sounds when it gets one of these messages.
Add a simple page to your site (which only you will access) that automatically reloads every minute or so, using the meta refresh tag. The PHP code in this page checks to see if any of the relevant events (user registration, etc.) have occurred during the last minute; if so, it outputs HTML that will play appropriate sounds (possibly from an embedded Flash movie). Keep this page open in your browser, and it will continuously poll your website for new activity.
Okay, I can think of a lot of other ways this could be done, but #2 is really the simplest.