Study project POWER that includes Raspberry Pi, Android and PHP WebServer.
These instructions will get you a copy of the project up and running on your local machine for development.
Programs and frameworks needed to run this server
- Follow this steps to install XAMPP pack for Windows.
Follow this steps to install XAMPP pack for Linux. - Start Apache and MySQL services through XAMPP Control Panel or console
- Now clone repo to xampp/htdocs/ folder
git clone https://github.com/jacekkulis/IncognitoServer
- Open browser and check if server is accessible
Write url in browser: http://localhost/IncognitoServer
- Install composer https://getcomposer.org/download/
- Use composer download dependencies link
go to composer.json directory
composer install
composer update
- Server is now setup and running,scripts can be accessed by Raspberry and Android.
Send HTTP POST with format like:
"keyName" : "value"
We need few info send through post:
Identificator:
"id" : "generated id"
Info about client (who wants anything) for example:
"client" : "raspberry"
"client" : "android"
Info about what client needs for example:
"request" : "notification"
"request" : "cameraPreview"
It can be send with JSON format.
Access scripts from Android using local adress http://10.0.2.2/directory/scriptName.php.
From Raspberry Pi use
- GuzzleHTTP - PHP HTTP client
- name - info
This project is licensed under the MIT License - see the LICENSE.md file for details