https://diyhacking.com/raspberry-pi-home-automation/
1.Copy the files DIYhackingIoT.zip to a server.
2. Put Main.html , buttonStatus.txt , buttonStatus.php ,button.php in a directory that can be seen on the internet. (/var/www/html/pibuttons)
3. Put rasbpi.py on the raspberry pi along with python and ssh into pi and run rasbpi.py
4. Goto webbrowser and put in ip or address of the Pi3 and turn on & off