Skip to content

Instantly share code, notes, and snippets.

@gocarlos
Created November 21, 2016 22:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gocarlos/b4be461db6114f74254fcd33dd0e5f3c to your computer and use it in GitHub Desktop.
Save gocarlos/b4be461db6114f74254fcd33dd0e5f3c to your computer and use it in GitHub Desktop.
Send a magic pack when calling a website (with php and etherwake )
<?php
echo "<br/>";
echo "<br/>";
$output =shell_exec('wakeonlan xy:xy:xy:xy:xy:xy');
echo "<pre>$output</pre>";
echo "wake up workstation";
echo "<br/>";
echo "<br/>";
$output =shell_exec('wakeonlan xy:xy:xy:xy:xy:xy');
echo "<pre>$output</pre>";
echo "wake up NAS";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment