I would like to create a chat script, and check for check new replies.
I need to a while Once every 4 seconds checking new message in file db.php
Sample :
function while_check_seen()
{
$(".replay").delay(4000).load("../db_pms.php?action=check");
while_check_seen()
}
This while worked, but used a lot of CPU!
Can anyone suggest a better way?
You can try this:
https://developer.mozilla.org/en/window.setInterval