Created
January 3, 2014 01:12
-
-
Save senorsmile/8230678 to your computer and use it in GitHub Desktop.
php example to control limitlessled light bulb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| ## This assumes proper privileges by php to write to /dev/udp/* | |
| ipaddress="192.168.0.201"; | |
| portnum="50000"; | |
| allon="\x35\00\x55"; | |
| shell_exec(echo -n -e "$allon" > /dev/udp/"$ipaddress"/"$portnum"); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Really clever snippet, great job!