Sending data to a .php service using Unity's WWW

So, my target platform is android, and I’m using unity’s WWW class to try and send data, a string and an integer, but the service is never receiving the data. I’ve tried two methods, and they are as follows:

WWWForm form = new WWWForm();
form.AddField("username", playerName);
form.AddField("score", playerScore);
WWW connection = new WWW("http://www.webdomian.com/directory/directory/webservice.php", form);

and I’ve tried:

WWWForm form = new WWWForm();
byte[] namedata = Encoding.ASCII.GetBytes(playerName);
byte[] scoredata = Encoding.ASCII.GetBytes(playerScore.ToString());
form.AddBinaryData("username", namedata);
form.AddBinaryData("score", scoredata);
WWW connection = new WWW("http://www.webdomian.com/directory/directory/webservice.php", form);

I’ve also tried those methods sending form.data instead of form, but to no avail.

The playerName, playerScore are both defined properly, and the dud web address is a real functioning address.

I’m getting the connection error: “Rejected because no crossdomain.xml policy was found” but there is a crossdomain.xml at the root of the php service. So, if anyone know’s why that is, that would be lovely.

root means www.yourdomain.com:80/crossdomain.xml thats where it searches for it, not the folder your php is in (its crossdomain.xml not cross-some-directory-on-the-server ;))

I thought earlier that that may be what it had meant, and have already tried putting it there, right now there is a crossdomain.xml in the root of the domain, and in the php’s folder, so I really don’t think I should be receiving this error.

are you seeing it in the editor or the webplayer? (the editor wins a price for being extremely bitchy picky, even with the configured domain in the editor settings it still tends to refuse it without a policy server on the other end cause the editor uses a tcp socket for the connection, not the browser http stream and tcp requires policy servers not crossdomain)

This is the editor that I’m working in. Is there some sort of viewable debug console when running the webplayer? I suppose I could do some sort of on screen feedback, but would prefer a debug console.

the webplayer feeds the log, its location is in the manual under debugging for the webplayer.

there is no console as such without you adding one and hooking up the debug callback to output it to screen (a simple gui textfield where you feed new lines is enough - or search the board here for the debugstreamer class)

The webplayer doesn’t work either.