title: [PHP]How do I count users online and users logged in, what method?
body: <p>I've made a log in script for my site, the session stuff basically look like this.</p>
  
  <pre><code>if($_SESSION['loggedin']=="Yes"){
  //user online stuff
  }
  </code></pre>
  
  <p>For all other users the session is set  </p>
  
  <pre><code>$_SESSION['loggedin']=="No";
  </code></pre>
  
  <p>How can i display active session that are set to yes or no? should i work anything with mysql tables and use crontabs? or should i count files in tmp(session directory) on apache?</p>
  
  <p>What are the best methods and how can I do it?</p>