Skip to content

Instantly share code, notes, and snippets.

@senorsmile
Created January 3, 2014 01:12
Show Gist options
  • Select an option

  • Save senorsmile/8230678 to your computer and use it in GitHub Desktop.

Select an option

Save senorsmile/8230678 to your computer and use it in GitHub Desktop.
php example to control limitlessled light bulb
<?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");
?>
@khromov
Copy link
Copy Markdown

khromov commented Jun 15, 2014

Really clever snippet, great job!

@yasharrashedi
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment