You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.2 KiB
47 lines
1.2 KiB
<?php
|
|
function face() {
|
|
$eyes = ['O', 'o', 'U', 'u', '>', '<', '^', '-', 'X', 'T', 'q'];
|
|
$mouths = ['w', 'u', 'o', '_', '-', 'x', '///', 'ω'];
|
|
$extras = [['', ''], ['', ''], ['', ''], ['', '-☆'], ['=', '='], ['d', 'b♪'], ['ξ(', ')ξ']];
|
|
|
|
$eye = $eyes[rand(0, count($eyes) - 1)];
|
|
$mouth = '';
|
|
do {
|
|
$mouth = $mouths[rand(0, count($mouths) - 1)];
|
|
} while(strcasecmp($mouth, $eye) == 0);
|
|
$extra = $extras[rand(0, count($extras) - 1)];
|
|
|
|
return $extra[0] . $eye . $mouth . $eye . $extra[1];
|
|
}
|
|
|
|
// This is my fallback error page
|
|
if($_SERVER['HTTP_HOST'] != 'uwu.xn--rck9c.xn--tckwe')
|
|
http_response_code(404);
|
|
|
|
// Return source code
|
|
if(isset($_GET['source'])) {
|
|
header("Content-Type: text/plain");
|
|
die(file_get_contents(basename($_SERVER['PHP_SELF'])));
|
|
}
|
|
|
|
// Plaintext
|
|
if(isset($_GET['raw'])) {
|
|
header("Content-Type: text/plain");
|
|
die(face());
|
|
}
|
|
|
|
$face = face();
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title><?php echo htmlspecialchars($face); ?></title>
|
|
<meta name="description" content="<?php echo $face; ?>">
|
|
</head>
|
|
<body>
|
|
<h1><?php echo htmlspecialchars($face); ?></h1>
|
|
</body>
|
|
</html>
|