WWW Error 404 issue

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

Exactly like AlfredDuler said. If your webserver returns a 404 the file/resource isn’t there. You either use the wrong url / path or the file isn’t accessible where it is now (due to a misconfiguration for example). It’s certainly nothing on the Unity side since your server has responded.

Just type your url in your webbrowser, i’m pretty sure you also get a 404 :wink:

ps: Keep in mind that most webservers are linux/unix based and the filesystem is case sensitive. So if your file is called “Hello.php” or “hello.PHP” you don’t access the right file.