OSDN Git Service

[add] : sleepを追加
authorhayao <shun819.mail@gmail.com>
Tue, 22 Dec 2020 08:13:50 +0000 (17:13 +0900)
committerhayao <shun819.mail@gmail.com>
Tue, 22 Dec 2020 08:13:50 +0000 (17:13 +0900)
index.html
sleep/index.php [new file with mode: 0644]
sleep/sleep.php [new file with mode: 0644]

index 678e774..ce201b1 100644 (file)
@@ -16,6 +16,9 @@
             <li>
                 <a href="./alteriso-options-generator/index.php">AlterISO3 ビルドオプション ジェネレータ</a>
             </li>
+            <li>
+                <a href="./sleep/index.php">n秒後に反応するサイト</a>
+            </li>
         </ul>
     </main>
 </body>
diff --git a/sleep/index.php b/sleep/index.php
new file mode 100644 (file)
index 0000000..ad66af0
--- /dev/null
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html lang="ja">
+
+<head>
+  <meta charset="UFT-8">
+  <title>指定された秒数後に応答する</title>
+</head>
+
+<body>
+  <h1>指定された秒数後に応答する</h1>
+  <p>
+    指定された秒数後に応答します。タイムアウトのテストなどに利用してください。
+  </p>
+  <p>
+    <form action="./sleep.php" method="GET">
+      <input type="number" name="time_to_wait"><br>
+      <input type="submit" value="実行">
+    </form>
+  </p>
+</body>
+
+</html>
\ No newline at end of file
diff --git a/sleep/sleep.php b/sleep/sleep.php
new file mode 100644 (file)
index 0000000..9c7cd51
--- /dev/null
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8" />
+  </head>
+  <body>
+    <?php
+        $wait = $_GET['time_to_wait'];
+        sleep($wait);
+    ?>
+  </body>
+</html>