This repository has been archived on 2020-03-25. You can view files and clone it, but cannot push or open issues or pull requests.
server-wakeonlan/index.php

54 lines
1.3 KiB
PHP
Raw Normal View History

2017-09-21 22:13:04 +00:00
<?php
// -------------------------------------------
// Wake On LAN Webclient -- on private LAN
// copyright: Jannik Beyerstedt | https://jannikbeyerstedt.de
// license: http://www.gnu.org/licenses/gpl-3.0.txt GPLv3 License
// -------------------------------------------
if (isset($_GET['wake'])) {
$return = shell_exec('wakeonlan '.$_GET['wake']);
}
?>
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>WakeOnLan @ UrsaMinor.fra80</title>
<style>
body {
max-width: 500px;
margin: 0 auto;
padding: 0 5px;
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
}
small {
font-size: 0.7em;
font-weight: 500;
}
li {
margin-bottom: 1.5em;
}
a, a:visited {
color: blue;
}
</style>
</head>
<body>
<h1>Wake On LAN Service</h1>
<?php if (isset($return)) : ?>
<p>The command returned:</p>
<pre><?php echo $return; ?></pre>
<a href="index.php">OK</a>
<?php endif; ?>
<p>I can wake up the following clients:</p>
<ul>
<li><a href="?wake=b8:ae:ed:ec:18:f7">nuc6i5-host (b8:ae:ed:ec:18:f7)</a></li>
</ul>
</body>
</html>