PHP Sessions from WWW

Hi,
I am trying to call a PHP which checks if a session is opened or not.

The PHP code is something like (let’s call it get_session.php):

session_start();

isset($_SESSION['user_id']) or die("No open session! " . $_SESSION['user_id']);

And the Unity script is:

public IEnumerator GetData()
{
	www = new WWW("http://localhost/get_session.php");

	yield return www;

	DataTransferred(www.text);
}

public void DataTransferred(string webdata)
{
    Debug.Log(webdata);
}

Interestingly the same script while is working for some scenes, it is not working for others. :frowning:

Any suggestions what to do?

thanks

don’t drive it from monobehavior i think?