You can not simply run command from php file to Reboot/Shutdown Raspberry Pi as you would from shell and it wouldn’t be very convenient to login to shell and issue Reboot/Shutdown command each time you need to bring reboot or shutdown your Raspberry Pi. You need to write script that would reboot Raspberry Pi. Some OS configuration changes to allow the reboot command from web application. Php page to execute script to shutdown or reboot Raspberry Pi. Python Script for…