Hi everyone,I'm trying to understand how I can interract between Unity and PHP so I started with simple stuff but it's been 3 days that I'm fighting with this and can't find a solution, I have this simple code:
string url = "http://localhost/login.php";
IEnumerator PhpRequest()
{
WWW webRequest2 = new WWW(url);
yield return webRequest2;
print(webRequest2.text);
}
and GUI button that calls the couroutine on click...
Then I have the "login.php" file with a simple echo instruction:
When I test it I get in Unity console a free line then a, I know this because I tried to execute something if(webRequest2.text == "a") and it didnt work, then I tried print("x"+webRequest2.text) and I got :
x
a
Thanks for reading, and I'm hopelessly waiting for an answer and hoping to finally move on to interesting stuff :'(
↧