Simple solution, write a small class that can be called from page hits and then have a javascript loop reqest data using ajax from another standalone script using the same class :p
If that didn't make sense :
notification.class.php
<?php
...
public function...