PHP Frontend - CodeClubLuxembourg/plottybot-toolkit-web GitHub Wiki
PHP Frontend
Functionality
The PHP frontend of PlottyBot handles user interactions and communicates with the Python backend. It utilizes AJAX to send commands to the server, enabling real-time communication with the plotter.
Key Files
- command.php: Acts as an intermediary between the frontend and the Python server, processing commands received from user inputs.
- calibration.php: HTML page (without PHP code) used for manual calibration.
- javascript.js: JavaScript file that manages frontend interactions and sends AJAX requests to
command.php
.
Interaction with the Backend
The frontend interacts with the Python server as follows:
- User Input: The user interacts with the web interface.
- AJAX Request: The interface sends an AJAX request to
command.php
. - Socket Communication:
command.php
forwards the command to the Python server via a socket. - Response Handling: The Python server processes the command, executes it, and sends a response back to the frontend.