bzcomputers
06-01-2013, 04:40 PM
I currently have the following code in in a custom page which works fine executing a php script.
exec('php -q /path/to/file/getImage.php');
The php that is being executed saves an image to the server.
What I'm trying to do is get this to execute every 30 seconds while the page is loaded.
I've tried something like this, but it wouldn't work.
<script type="text/javascript">
jQuery(document).ready(function() {
setInterval(function() {
jQuery.get('/path/to/file/getImage.php');
}, 30000);
});
</script>
exec('php -q /path/to/file/getImage.php');
The php that is being executed saves an image to the server.
What I'm trying to do is get this to execute every 30 seconds while the page is loaded.
I've tried something like this, but it wouldn't work.
<script type="text/javascript">
jQuery(document).ready(function() {
setInterval(function() {
jQuery.get('/path/to/file/getImage.php');
}, 30000);
});
</script>