Initial commit.
This commit is contained in:
parent
a9c913c9a7
commit
317e1b4e10
13 changed files with 260 additions and 0 deletions
27
challenge/challenge.php
Normal file
27
challenge/challenge.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
permalink: /cgi/challenge/
|
||||
---
|
||||
|
||||
<?php
|
||||
session_start();
|
||||
session_set_cookie_params(3600);
|
||||
|
||||
date_default_timezone_set("{{ site.timezone }}");
|
||||
|
||||
if(isset($_SESSION["one"])) {
|
||||
unset($_SESSION["one"]);
|
||||
}
|
||||
|
||||
if(isset($_SESSION["two"])) {
|
||||
unset($_SESSION["two"]);
|
||||
}
|
||||
|
||||
$_SESSION["one"] = rand(0, 9);
|
||||
$_SESSION["two"] = rand(0, 9);
|
||||
#$_SESSION["sum"] = $_SESSION["one"] + $_SESSION["two"];
|
||||
|
||||
$challenge = $_SESSION["one"] . " + " . $_SESSION["two"];
|
||||
|
||||
header('Content-Type: text/plain');
|
||||
echo($challenge);
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue