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:
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.