I'm doing a huge project with Symfony2. Frontend is javascript/html5 canvas. For site changes I use ajax requests.
Now I want to call a php file which should be executed with EVERY user action. Is there an elegant way to do so?
For better understanding: I'm doing some kind of game and the php checks, if something happend (recruitments done, buildings finished etc.).