php

  • check.php

    <?php $query = "SELECT TIMESTAMP FROM TABLENAME WHERE (GETDATE() - TIMESTAMP) > 60"; $result = mysqli_query($query, $con); while($row = mysqli_fetch_assoc($result)){…

    Devamını Oku »
  • update.php

    <?php $uid = $_GET["userid"]; $query = "UPDATE TABLENAME SET TIMESTAMP = GETDATE() where user_id = $uid"; $status = mysqli_query($query, $con);…

    Devamını Oku »
  • check.js

    setInterval(function(){ $.ajax({ url: "/check.php", success: function(response){ console.log(response); } }); }, 10000);

    Devamını Oku »
  • update.js

    setInterval(function(){ $.ajax({ url: "/update.php?userid=45", success: function(response){ console.log(response); } }); },10000);

    Devamını Oku »
Başa dön tuşu