Last active
March 3, 2021 09:11
-
-
Save chefblogger/c4a2c21b6c9d199db27211ff3bf834b7 to your computer and use it in GitHub Desktop.
This file contains 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
<div id="refresh"></div> | |
<div id="time"> | |
<?php | |
date_default_timezone_set("Europe/Berlin"); | |
$timestamp = time(); | |
$stunde = date("H",$timestamp); | |
$minute = date("i",$timestamp); | |
$sekunde = date("s",$timestamp); | |
$bin_stunde = decbin($stunde); | |
$bin_minute = decbin($minute); | |
$bin_sekunde = decbin($sekunde); | |
$str_length = 6; | |
$bin_stunde1 = substr("0000{$bin_stunde}", -$str_length); | |
$bin_minute1 = substr("0000{$bin_minute}", -$str_length); | |
$bin_sekunde1 = substr("0000{$bin_sekunde}", -$str_length); | |
//echo "6stellig: $bin_stunde1<br>"; | |
//echo "6stellig: $bin_minute1<br>"; | |
//echo "6stellig: $bin_sekunde1<br>"; | |
/* ################################################################################################ */ | |
// stunde | |
$teilung1_stunde1 = substr($bin_stunde1, 0, 1); | |
$teilung2_stunde1 = substr($bin_stunde1, 1, 1); | |
$teilung3_stunde1 = substr($bin_stunde1, 2, 1); | |
$teilung4_stunde1 = substr($bin_stunde1, 3, 1); | |
$teilung5_stunde1 = substr($bin_stunde1, 4, 1); | |
$teilung6_stunde1 = substr($bin_stunde1, 5, 1); | |
if ($teilung1_stunde1 == '0') { | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/o-off.png'>"; | |
} | |
else | |
{ | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/o-on.png'>"; | |
} | |
if ($teilung2_stunde1 == '0') { | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/o-off.png'>"; | |
} | |
else | |
{ | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/o-on.png'>"; | |
} | |
if ($teilung3_stunde1 == '0') { | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/o-off.png'>"; | |
} | |
else | |
{ | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/o-on.png'>"; | |
} | |
if ($teilung4_stunde1 == '0') { | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/o-off.png'>"; | |
} | |
else | |
{ | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/o-on.png'>"; | |
} | |
if ($teilung5_stunde1 == '0') { | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/o-off.png'>"; | |
} | |
else | |
{ | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/o-on.png'>"; | |
} | |
if ($teilung6_stunde1 == '0') { | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/o-off.png'>"; | |
} | |
else | |
{ | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/o-on.png'>"; | |
} | |
ECHO "<br />"; | |
/* ################################################################################################ */ | |
// minute | |
$teilung1_minute1 = substr($bin_minute1, 0, 1); | |
$teilung2_minute1 = substr($bin_minute1, 1, 1); | |
$teilung3_minute1 = substr($bin_minute1, 2, 1); | |
$teilung4_minute1 = substr($bin_minute1, 3, 1); | |
$teilung5_minute1 = substr($bin_minute1, 4, 1); | |
$teilung6_minute1 = substr($bin_minute1, 5, 1); | |
if ($teilung1_minute1 == '0') { | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/x-off.png'>"; | |
} | |
else | |
{ | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/x-on.png'>"; | |
} | |
if ($teilung2_minute1 == '0') { | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/x-off.png'>"; | |
} | |
else | |
{ | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/x-on.png'>"; | |
} | |
if ($teilung3_minute1 == '0') { | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/x-off.png'>"; | |
} | |
else | |
{ | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/x-on.png'>"; | |
} | |
if ($teilung4_minute1 == '0') { | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/x-off.png'>"; | |
} | |
else | |
{ | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/x-on.png'>"; | |
} | |
if ($teilung5_minute1 == '0') { | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/x-off.png'>"; | |
} | |
else | |
{ | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/x-on.png'>"; | |
} | |
if ($teilung6_minute1 == '0') { | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/x-off.png'>"; | |
} | |
else | |
{ | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/x-on.png'>"; | |
} | |
ECHO "<br />"; | |
/* ################################################################################################ */ | |
// sekunde | |
$teilung1_sekunde1 = substr($bin_sekunde1, 0, 1); | |
$teilung2_sekunde1 = substr($bin_sekunde1, 1, 1); | |
$teilung3_sekunde1 = substr($bin_sekunde1, 2, 1); | |
$teilung4_sekunde1 = substr($bin_sekunde1, 3, 1); | |
$teilung5_sekunde1 = substr($bin_sekunde1, 4, 1); | |
$teilung6_sekunde1 = substr($bin_sekunde1, 5, 1); | |
if ($teilung1_sekunde1 == '0') { | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/k-off.png'>"; | |
} | |
else | |
{ | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/k-on.png'>"; | |
} | |
if ($teilung2_sekunde1 == '0') { | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/k-off.png'>"; | |
} | |
else | |
{ | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/k-on.png'>"; | |
} | |
if ($teilung3_sekunde1 == '0') { | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/k-off.png'>"; | |
} | |
else | |
{ | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/k-on.png'>"; | |
} | |
if ($teilung4_sekunde1 == '0') { | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/k-off.png'>"; | |
} | |
else | |
{ | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/k-on.png'>"; | |
} | |
if ($teilung5_sekunde1 == '0') { | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/k-off.png'>"; | |
} | |
else | |
{ | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/k-on.png'>"; | |
} | |
if ($teilung6_sekunde1 == '0') { | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/k-off.png'>"; | |
} | |
else | |
{ | |
ECHO "<img src='https://www.bahnhofsuhrsg.ch/bin/k-on.png'>"; | |
} | |
/* ################################################################################################ */ | |
?> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment