dievas Posted January 24, 2015 Share Posted January 24, 2015 how to set 24 hour active player to my website? Link to comment Share on other sites More sharing options...
Tessa Posted January 24, 2015 Share Posted January 24, 2015 (edited) Some more details about what exactly you want? Edited January 24, 2015 by Tessa Link to comment Share on other sites More sharing options...
dievas Posted January 24, 2015 Author Share Posted January 24, 2015 (edited) $time=time() + 24*60*60; $active=@mysql_numrows(mysql_query("SELECT * FROM characters WHERE lastAccess<$time",$link)); dont work i dont know why, iwant to add how many player logged in in 24 hours show in my website please help Edited January 24, 2015 by dievas Link to comment Share on other sites More sharing options...
Tessa Posted January 24, 2015 Share Posted January 24, 2015 (edited) Something like this: <?php $con = mysqli_connect("localhost","root","","l2jdb") or die("Error " . mysqli_error($con)); $date = date(strtotime("-1 day")); $query = "SELECT char_name, lastAccess FROM characters WHERE lastAccess / 1000 > $date ORDER BY char_name" or die("Something went wrong.." . mysqli_error($con)); $result = $con->query($query); while($row = mysqli_fetch_array($result)) { echo $row["char_name"] . " - " . date("d/m/Y H:i:s", $row["lastAccess"] / 1000) . "<br>"; } ?> Edited January 24, 2015 by Tessa Link to comment Share on other sites More sharing options...
dievas Posted January 24, 2015 Author Share Posted January 24, 2015 (edited) works. thanks (y) i implemented and modified a little see www.l2kill.com Edited January 24, 2015 by dievas Link to comment Share on other sites More sharing options...
Tessa Posted January 24, 2015 Share Posted January 24, 2015 Looks fine :) Link to comment Share on other sites More sharing options...
MeVsYou Posted January 24, 2015 Share Posted January 24, 2015 locked Link to comment Share on other sites More sharing options...
Recommended Posts