Now I have been puzzling with this for some time. I got part of it together in jquery/ajax:
<script type="text/javascript">
$(document).ready(function(){
jQuery.ajax({
type: "GET",
url: "sessioncheck.php",
dataType:"json",
success:function(response){
if (response) {
window.location.href = 'logout.php';
}
else {
// Process the expected results...
}
}
});
});
</script>
This works perfectly, but I would like this process to repeat itself every 30 seconds. Can someone please help me with that? I have read something about setinterval, but I cant seem to get it to work.
Thanks a lot in advance for all of your help!