email.php 583 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. require_once '../runtime.php';
  3. require_once '../func.php';
  4. ini_set('max_execution_time', '0');
  5. $baseURL = 'http://cloud.yinqingli.net';
  6. $out = '';
  7. while(true) {
  8. $i++;
  9. $context = stream_context_create(array(
  10. 'http' => array(
  11. 'timeout' => 1000
  12. )
  13. ));
  14. $out .= file_get_contents($baseURL.'/queue.php?act=email', 0, $context);
  15. $file = LOG_DIR.'crontab_email_'.date('Ymd').'.log';
  16. Suco_File::write($file, $out, 'a');
  17. echo '<pre>'.$out.'</pre>';
  18. echo '<script>window.location = \'/crontab/email.php?time='.(time()).'\'</script>';
  19. // unset($log, $out);
  20. die;
  21. }