parent
6883bf129d
commit
7c5c56b581
6 changed files with 42 additions and 1 deletions
@ -0,0 +1 @@ |
||||
SESSION_COOKIE= |
@ -1,4 +1,4 @@ |
||||
.idea |
||||
.env |
||||
node_modules |
||||
|
||||
input/* |
||||
|
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…
Reference in new issue