Javascript Facebook PHP - Send notifications -


i want send out, every monday @ 10 (cronjob) notifications users using app new round has begun.

the problem is, works 5-6 testuser, thats fine, happen if app has more 1000 user (e.g).
hosting hast max execution time set 30 sec , cannot modify it.

one solution be, start php script have iframe loads send-php-script range (e.g.) 1-50 users, reload, , load 51 - 100, , on

i tried code failed. here's attempt:

  <script> <?php foreach($userids $id) {     ?>     var url = 'cron_send_notify_iframe.php?id= + '<?php echo $id['userid'];?>' + &tabpageid= + '<?php echo $id['tabpageid'];?> ' + &token= + '<?php echo $appaccesstoken?>;     document.getelementbyid('iframe').src = url;     <?php     sleep(1); } ?>               </script> <iframe width="271px" height="295px" frameborder="no" id="iframe" src=""></iframe> 

cron_send_notify_iframe.php handels send of notification (works fine uid).

i thought, can send 1 notification per second. work? there better solutions? maybe give range ($from - $to) , send them... think?


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -