[eluser]nikefido[/eluser]
It is probably creating a new session based on the ajax calling the site without the "www" vs a site with the "www"
For instance, if you are at "http://www.mysite.com" but your ajax is calling "http://mysite.com", you might get 2 sessions started there - a new session created for your ajax call.
This can also happen with http vs https (but using ajax with "http" vs "https" creates a JS security error in my experience)
As a side note, why are you using file_get_contents? This could totally be my ignorance, but I've only seen that used when reading local files (ajax calls return the entire HTML output of their server requests, so file_get_contents seems unnecessary to me)