added teapot

This commit is contained in:
reallyniceusername 2023-06-27 11:53:01 +00:00
parent 3f1e381211
commit a89c4583db
2 changed files with 43 additions and 0 deletions

1
links Submodule

@ -0,0 +1 @@
Subproject commit ba0a58b2e053401f77ae33e08f2b1a05b042c4d4

42
teapot.php Normal file
View File

@ -0,0 +1,42 @@
<!DOCTYPE html>
<?php $user = posix_getpwuid(fileowner(__FILE__))["name"]; ?>
<html>
<head>
<?php include("head.php"); ?>
</head>
<body>
<?php include("nav.php"); ?>
<?php
$brew=$_GET['brew'];
# return error if asked for not tea
if($brew !== 'tea'){
http_response_code(418);
echo('Error 418: I\'m a teapot!');
die();
}
echo('<p>Your tea is ready!</p><br><br>');
echo('<pre>');
echo('
( ) ( ) )
) ( ) ( (
( ) ( ) )
_____________
<_____________> ___
| |/ _ \
| | | |
| |_| |
___| |\___/
/ \___________/ \
\_____________________/
');
echo('</pre>');
?>
</body>
</html>