In this section, we are going to use PHP to build the server-side part of the project. If you are a complete novice in PHP, I recommend the following resource to learn the basics of the language:
First, we are going to see the content of the
datalogger.php file. This file will handle the requests coming from the Arduino board, log the data in a database, and answer with a simple message. Note that this file has to be in a folder named
datalogger on your web server. We will see the important parts of the code. To get the complete code for this section, please refer to the GitHub repository of the chapter. Note that all the PHP code should be between the
<php … ?> tags.
The file ...