title: How to access php sessions on different computers
body: <p>I'm doing some exercises on using sessions in php. I set it up this way:</p>
  
  <pre><code>$_SESSION['log_users'][] = array(array('Username'=&gt;$username))
  </code></pre>
  
  <p>I tried to experiment on it. And found out that the session that is being generated is different when I use a different ip for accessing it. While using the same browser, which is firefox.</p>
  
  <p>Here is what I did:</p>
  
  <ol>
  <li>Setup my router so that others will be able to access the exercise that I'm working on through the use of my external ip address.</li>
  <li><p>I then opened the localhost version of the exercise:</p>
  
  <p><a href="http://localhost/exercise/sessions.php" rel="nofollow">http://localhost/exercise/sessions.php</a></p></li>
  <li><p>Then the one using the external ip address:</p>
  
  <p><a href="http://201.xxx.xxx/exercise/sessions.php" rel="nofollow">http://201.xxx.xxx/exercise/sessions.php</a></p></li>
  <li><p>I then filled up the session array on each browser tab. And found out that each of those two keeps a different version of the session. Found out by using <code>print_r($_SESSION['log_users'])</code></p></li>
  </ol>
  
  <p>Is this really the way it should behave? Is there anything I can do so that there's only one version of the session? I'm currently using Wampserver 2.1</p>