title: Why does the session id change when requesting through ajax in php?
body: <p>I'm logged in on <code>Banana.com</code>. Banana has a api link on <code>/app/ajax_loggedin</code>.</p>
  
  <p>My website is Monkey. Monkey runs a simple GET json to banana's <code>/app/ajax_loggedin</code>, which returns a loggedin value either 1 or 0.</p>
  
  <p>Why is it always returning 0 when it's through ajax, even though I really am logged in on Banana and also when accessing the link directly gives me 1.
  How can the developer at Banana fix it?</p>
  
  <p>I would have understood it if it's a server side call, but I don't understand why it wont tell me if im logged in, if Banana makes the request. Running <code>session_id()</code> check, it generates a new one each call through ajax and when accessing directly it works just fine and keeps the same.</p>
  
  <p>Is there any fix or another way to do this?</p>