I'm using Unity 3D's WWW to make http requests: http://docs.unity3d.com/ScriptReference/WWW.html
It seems that no matter what kind of data I'm trying to access, it just returns: ���� every time. I've tried json files, I've tried php that just generates a string. I can't seem to access the values on the server.
C#:
public string url = "http://www.onelittledesigner.com/data.php";
IEnumerator Start() {
WWW www = new WWW(url);
yield return www;
if (!string.IsNullOrEmpty(www.error)) {
Debug.Log(www.error);
} else {
Debug.Log(www.text);
}
}
PHP:
<?php
echo "textiness";
?>
Note: I've used www.texture successfully to pull images off of the server. However, www.text doesn't seem to be working.