The player's scores are stored in a SQLite database. Access to the database is facilitated through the PHP scripts provided. In our example, all the PHP scripts were placed in a folder on our local machine, from which we'll run the server (it can be anywhere when using the PHP built-in server). So, the scripts are accessed via http://localhost:8000.
All access is facilitated through the PHP file called index.php. This is called a Front Controller, acting like a receptionist in a building, interpreting requests and asking the appropriate function to execute some actions and return a result in response to the request.
There are five actions implemented, and each is indicated by adding the action name at the end of the URL. (This is the GET HTTP method, which is sometimes used for web forms. Take a look at the address bar of your browser next time you search Google for example). The actions and their parameters (if any) are as follows:
- action = list & format...