Mohammad Faizan Khan Mohammad Faizan Khan - 1 year ago 95
PHP Question

Empty reply from server When accessing PHP page from C#

Empty reply from server

When and why this error comes ? I try to access PHP page from my C# code then it gives me this error. I think that it is not code fault anyhow if someone figure it out then it will be good. I have exhaustivel search it but no success my code is simple.

string dataGetURL = "http://localhost/HighScore/GetScore.php";
WWW getData = new WWW(dataGetURL);
yield return getData;
if (getData.error != null)
Debug.LogError("There was an error getting the high score: " + getData.error);
else {

dataGetURL is perfectly working when i directly put it into my browser but i dont know why it is not working with C# Unity WWW.

Answer Source

For future users, It just worked by changing the localhost into my Computer IP.

string dataGetURL = "http://your IP Address/HighScore/GetScore.php";
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download