title: php : save login although browser is closed
body: <p>how to create a login system that is still logged in (as long as user wouldn't click log out) although browser is closed?</p>
  
  <p>when using <code>$_SESSION</code> , it was gone when browser is closed. So, we can use <code>$_COOKIE</code>, but it looks like less secure then session.</p>
  
  <p>How yahoo, facebook, twitter or any site create their login system, so when user close the browser, it will stay logged in? Using IP? $_SESSION? $_COOKIE? or what?</p>
  
  <p>Thank you</p>