Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2016
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.35 KB | None | 0 0
  1. <script type="text/javascript">
  2. $(document).ready(function(){
  3.     setInterval(function(){
  4.         $.post("users/helpers/logoutcheck.php", {loginstatus:$("#loginstatus").text()},
  5.             function(data) {
  6.                 //data returns either 0 or the URL to go to, calculated by the PHP page
  7.                 if (data != '0') {window.location.replace(data);}  
  8.             });
  9.             },5000);
  10. });
  11. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement