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.
Any suggestions what to do?
thanks