fork download
  1. <?php
  2. $output = "KCSC";
  3.  
  4. if ($_SERVER["REQUEST_METHOD"] == "POST") {
  5. if (isset($_POST["username"]) && !empty($_POST["username"])) {
  6. $username = $_POST["username"];
  7. } else {
  8. $username = "KCSC";
  9. }
  10. $output = shell_exec("echo $username");
  11.  
  12. if ($output) {
  13. $output = htmlentities(trim($output));
  14. if (strlen($output) > 1000) {
  15. $output = substr($output, 0, 1000) . "\n... (output truncated)";
  16. }
  17. }
  18. }
  19.  
  20. $ascii_art = <<< EOF
  21. <pre>
  22. <div class="text-center">-------------------<br>Meow Meow, $output!<br>-------------------</div>
  23.   \/
  24.   \/
  25.   \/
  26.   \/
  27.   `::`
  28.   /
  29.   ` `;:`
  30.   _ .;:; /
  31.   _(_)_ ::; wWWWw ,,, _
  32.   (_)<font color="orange">@</font>(_),,, _ ';:;;' (___) {{{}} _(_)_
  33.   /(_) {{{}} >'. || _ ~Y~ ~Y~ (_)<font color="pink">@</font>(_) |\__/,| (`\
  34.   | {{}~Y~ `> \||.'< (<font color="crimson">@</font>)\|{}} \|/ /(_) |_ _ |.--.) )
  35.   (\|/)~Y~\|/ `>|/ <` \Y/\|~Y~ \|/ (\|/) ( T ) /
  36.   \|//\|/\|// `||/` \|/\|\|/\|//\|// (((^_(((/(((_/
  37. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  38. <pre>
  39. EOF;
  40. ?>
  41. <!DOCTYPE html>
  42. <html lang="en">
  43.  
  44. <head>
  45. <meta charset="UTF-8">
  46. <meta username="viewport" content="width=device-width, initial-scale=1.0">
  47. <title>KCSC - Meow Meow</title>
  48. <link rel="stylesheet" href="static/style.css">
  49. <link rel="shortcut icon" href="./static/favicon-32x32.png" type="image/x-icon">
  50. </head>
  51.  
  52. <body>
  53. <div class="container">
  54. <div class="ascii_art">
  55. <?= $ascii_art; ?>
  56. </div>
  57. <div class="form-container">
  58. <form action="/" method="POST">
  59. <input class="text-center" type="text" name="username" placeholder="What's your name?">
  60. </form>
  61. </div>
  62. </div>
  63. </div>
  64. </body>
  65.  
  66. </html>
Success #stdin #stdout #stderr 0.03s 26176KB
stdin
Standard input is empty
stdout
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta username="viewport" content="width=device-width, initial-scale=1.0">
    <title>KCSC - Meow Meow</title>
    <link rel="stylesheet" href="static/style.css">
    <link rel="shortcut icon" href="./static/favicon-32x32.png" type="image/x-icon">
</head>

<body>
    <div class="container">
        <div class="ascii_art">
            <pre> 
<div class="text-center">-------------------<br>Meow Meow, KCSC!<br>-------------------</div>
                                    \/
                                      \/
                                         \/
                                         \/
                            `::`
                            /
                            `    `;:`
        _          .;:;          /                  
      _(_)_        ::;       wWWWw  ,,,     _      
     (_)<font color="orange">@</font>(_),,,  _ ';:;;'    (___) {{{}}  _(_)_     
      /(_) {{{}} >'. ||  _    ~Y~   ~Y~  (_)<font color="pink">@</font>(_)      |\__/,|   (`\
      |  {{}~Y~  `> \||.'< (<font color="crimson">@</font>)\|{}} \|/   /(_)        |_ _  |.--.) )
    (\|/)~Y~\|/    `>|/ <` \Y/\|~Y~ \|/ (\|/)         ( T   )     /
     \|//\|/\|//    `||/`  \|/\|\|/\|//\|//          (((^_(((/(((_/
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<pre>        </div>
        <div class="form-container">
            <form action="/" method="POST">
                <input class="text-center" type="text" name="username" placeholder="What's your name?">
            </form>
        </div>
    </div>
    </div>
</body>

</html>
stderr
PHP Notice:  Undefined index: REQUEST_METHOD in /home/Ek7O4e/prog.php on line 4