7) Upload PHP Scripts
- Download the PHP code here and open it in your text editor.
- Update the values at the top of the file to match your settings:
- Save the file and upload it somewhere within your webserver’s document root so that you can access it via a URL.
- Access that URL to turn the lamp on and off using the “set” parameter:
- Drag each of those URLs to your bookmarks bar for convenient access!
Note: When you’ve confirmed that you have it working, you’ll want to take appropriate steps to secure this page so that unauthorized people don’t start messing with your lights! Look into setting up your server for basic authentication if you’re using Apache as your web server.