Hi folks, I"m doing a small test accessing a file on a server using this code:
public class GetURL : MonoBehaviour
{
void Start ()
{
string url = "http://mywebaddress.com/hello.php";
WWW www = new WWW (url);
StartCoroutine (WaitForRequest (www));
}
IEnumerator WaitForRequest (WWW www)
{
yield return www;
// check for errors
if (www.error == null) {
Debug.Log ("WWW Ok!: " + www.text);
} else {
Debug.Log ("WWW Error: " + www.error);
}
}
}
The problem is, I keep receiving a WWW Error: 404 Not Found error. I’ve placed the hello.php in the root of my webspace so the file is definately there, I really can’t see what the issue is!
Any ideas?
Thanks