comparison myrss/index.php @ 27:f93693980ead

myrss: limit number of forked processes; tweak indexing; print both stdout and stderr from shell script to php page
author paulo@thepaulopc
date Sat, 04 Jun 2011 22:20:26 -0700
parents 469b1e6dd364
children 28221b9bb370
comparison
equal deleted inserted replaced
1:c1030f29ac7c 2:3f455d3be799
9 $cache_mtime = filemtime($cache_fn); 9 $cache_mtime = filemtime($cache_fn);
10 10
11 $newbody = ''; 11 $newbody = '';
12 12
13 if ((time() - $cache_mtime >= $cache_life)) { 13 if ((time() - $cache_mtime >= $cache_life)) {
14 $newbody = shell_exec('./myrss_update.sh'); 14 $newbody = shell_exec('./myrss_update.sh 2>&1');
15 file_put_contents($cache_fn, $newbody); 15 file_put_contents($cache_fn, $newbody);
16 } else { 16 } else {
17 $newbody = file_get_contents($cache_fn); 17 $newbody = file_get_contents($cache_fn);
18 } 18 }
19 19