Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(E_ALL);
- error_reporting(-1);
- /* GPIO 17 = BLUE
- GPIO 4 = GREEN
- GPIO 22 = RED */
- if(isset($_POST["redcolor"])) {
- $rot = $_POST["redcolor"];
- } else {
- $rot = 0;
- }
- if(isset($_POST["blucolor"])) {
- $blau = $_POST["blucolor"];
- } else {
- $blau = 0;
- }
- if(isset($_POST["grecolor"])) {
- $gruen = $_POST["grecolor"];
- } else {
- $gruen = 0;
- }
- $give = fsockopen("quasar.unixbox.tk", 45450, $errno, $errstr, 50);
- if(!$give) {
- echo "$errstr ($errno)<br />\n";
- } else {
- fwrite($give, $rot);
- fwrite($give, $gruen);
- fwrite($give, $blau);
- fclose($give);
- }
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
- <title>Quasar</title>
- <link rel="stylesheet" type="text/css" href="styles.css">
- </head>
- <body>
- <div id="banner">
- <h4>The Quasar Laboratory</h4>
- </div>
- <div id="under_banner_right">
- <p>In Farbe und Bunt</p>
- </div>
- <div id="main_field">
- <img src="http://myhead.unixbox.tk:8081">
- </div>
- <div id="formular">
- <form method="post">
- <p>
- Blue <input type="radio" name="redcolor" value="1"> On <br>
- Green <input type="radio" name="blucolor" value="1"> On <br>
- Red <input type="radio" name="grecolor" value="1"> On <br>
- </p>
- <Input type="submit" value="Go">
- </form>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement