In my video game I want users to be able to publish/get map data from a MySQL server.
My problem is that I want to make it limited to make the program only be able to create/get levels, not being able to spam the hell out of the page and make loads of fake levels (by the php page)
I’m trying to prevent the number of fake requests, so that real users playing the game can only have real access to the PHP content, not people who want to spoil the experience.
I’m aware that I can do a simple check for a code, but what happens when that code is caught out? It’s not really authentication, perhaps I could do a serial check, but the game won’t require you to register online and make an account at all.
As mentioned in comments, I would recommend you using REST web services. I’m actually using tonic REST framework, or if you need something lightweight, silex might be the right for you.