聊天网页中等待用户的通知

I am developing a simple website for the purpose of chatting with customers, and I've gotten to a slight roadblock.

Is there a better way to send a notification to a technician when a new user begins a chat session then the following?

I have considered these two options:

  1. Push a sendmail email to the tech upon creation of a new session.
  2. Make a c++ cgi program on the server and a partner local computer application to poll the server and notify the tech.

But I'm a fledgling web developer, so I hope someone can offer a better alternative!

Depends on how the technician works. You could create a web-based solution with php and jQuery which sends an AJAX request every 20 seconds:

function Session(){
$.post('checksession.php', function(data) {
$('.result').html(data);

setTimeout(Session,20000);
});}

The checksession.php-script has to check the database (or whatever) and echo some result. This result is sent to the div with class "result". With jQuery you could color it green when a user has a question. PHP can send an E-Mail, too. Your technician just has to open that page the whole day - but you don´t have to use a non-web language.