Okay, the facts.
- I need my game to send information to my server.
- I need the server to deny the information if the game tries to send it too often.
- I needed a way to identify the game/user, so I selected the “deviceID”, as it is pretty unique.
- I can manually enter my information, and deviceID, into my MySQL database using PHP MyAdmin.
- I wrote a PHP script that the game sends the information to. The script enters the info into the DB.
- If I send the deviceID, the entry fails. If I send a text string, the entry fails. If I send a number, it works.
- The location of the deviceID in my database is NOT an INT, or number, instead it is a text string.
Being that I can enter this data manually, and it works fine, I have to assume that PHP is choking/having an issue with the data.
Currently, I am using GET for passing data, and I produce something like:
http://www.myserver.com/update.php?float1=345.448&float2=678.158&device=add6aa7e36b2003a85de9e51a509c5da&target=34
Would using POST work instead? And if so, how do I use POST with the Async HTTP?
I understand this:
network.request("http://www.myserver.com/update.php", "POST")
The params part, however, I am yet unclear on. Do I pass the variables in the header or body?
Thanks so much for any help. This has gotten very frustrating.
UPDATE: Solved it. Forced a ’ before and after the string and it worked.
[import]uid: 30399 topic_id: 11285 reply_id: 311285[/import]