Benjamin Kraft 2 weeks ago
parent 6883bf129d
commit 7c5c56b581
  1. 1
      .env.example
  2. 2
      .gitignore
  3. BIN
      public/favicon.ico
  4. 17
      public/fetch.php
  5. 13
      public/index.php
  6. 10
      public/styles.css

@ -0,0 +1 @@
SESSION_COOKIE=

2
.gitignore vendored

@ -1,4 +1,4 @@
.idea
.env
node_modules
input/*

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

@ -0,0 +1,17 @@
<?php
foreach (parse_ini_file("../.env") as $key => $value){
$_ENV[$key] = $value;
}
for ($i = 1; $i <= 25; $i++){
$context = stream_context_create([
'http' => [
'header' => 'Cookie: session=' . $_ENV["SESSION_COOKIE"] . '\r\n'
]
]);
$contents = file_get_contents("https://adventofcode.com/2024/day/$i/input", context: $context);
file_put_contents("../input/$i.txt", $contents);
}

@ -0,0 +1,13 @@
<html lang="en">
<head>
<link rel="stylesheet" href="styles.css"/>
<title>AoC 2024 Solutions</title>
</head>
<body>
<?php
?>
</body>
</html>

@ -0,0 +1,10 @@
@import url('https://fonts.googleapis.com/css2?family=Red+Hat+Mono:ital,wght@0,300..700;1,300..700&display=swap');
body {
background-color: rgb(30, 30, 30);
}
* {
color: white;
font-family: "Red Hat Mono", serif;
}
Loading…
Cancel
Save