WebOrbiton
v1.0.0.0

StocketBase

19 lines · 405 B
  1. <?php
  2. ​
  3. declare(strict_types=1);
  4. ​
  5. require_once __DIR__ . '/includes/config.php';
  6. require_once __DIR__ . '/includes/database.php';
  7. require_once __DIR__ . '/includes/indexnow.php';
  8. ​
  9. $key = IndexNow::key();
  10. $requested = (string) ($_GET['key'] ?? '');
  11. ​
  12. if ($key === '' || !hash_equals($key, $requested)) {
  13. http_response_code(404);
  14. exit;
  15. }
  16. ​
  17. header('Content-Type: text/plain; charset=utf-8');
  18. echo $key;
  19. ​