I've been using the example code in the unity documents to send and get high score data from a php file on a server. I use the header to store the authorization key to access that file and it works a charm.
Now I tried the same thing for a different php file for the login server and it doesn't work. The authorization key is correct because I've tested it in a browser and it returns some information but in-game the server just times out waiting for a POST request.
The server admin claims that there have been no access attempts logged so it must be stumbling right after accepting the authorization key, if I remove the secret key then the server returns straight away with an unauthorized access message.
Has anyone else had this problem? Is there another way to POST or GET on a server with or without using the unity WWW class.
I've tried using unity 3 and have changed www.data to www.text but it still doesn't work. Is there any new functions on the latest WWW class?
This is for iPhone if it makes any difference.
asked Aug 01 '10 at 03:33 PM
This is something I'm using atm, works a treat. Of course there's also a lot of additional checking etc in headings for security etc.
answered Sep 07 '10 at 01:06 PM
Saw this on another answers page. You can't modify a WWWForm's headers directly, you have to create your own:
answered Dec 21 '12 at 02:11 AM