title: show online if user views my page and show offline if he closes
body: <p>i am sending my customer a url of my specific page , i need a indication that whether he is online or offline in my page. there is no problem of multi-users,its a page that can be viewed by only one user at a time.</p>
  
  <p>i tried unsetting the session on browser close it won't works</p>
  
  <pre><code>session_start();
  
  $_SESSION["firstname"] = "Peter";
  $_SESSION["lastname"] = "Parker";
  
  echo 'Hi, ' . $_SESSION["firstname"] . ' ' . $_SESSION["lastname"];
  
  session_destroy();
  </code></pre>
  
  <p>i expect the online status of this page on my dashboard page</p>