| Server IP : 188.114.96.3 / Your IP : 216.73.216.143 Web Server : Apache System : Linux sv058.home.net.pl 6.8.2 husak_dirty_pages_fix #1 SMP PREEMPT_DYNAMIC Tue Apr 2 22:06:51 CEST 2024 x86_64 User : ( 3194769) PHP Version : 8.5.12 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /polana/ |
Upload File : |
<?php
declare(strict_types=1);
require_once __DIR__.'/includes/functions.php';
require_once __DIR__.'/includes/polana_v175_booking.php';
header('Content-Type: application/json; charset=UTF-8');
header('Cache-Control: no-store, max-age=0');
header('X-Content-Type-Options: nosniff');
header('X-Robots-Tag: noindex,nofollow');
$date = (string)($_GET['date']??'');
if (strlen($date)>10) $date='';
try {
$result=pv175_available_slots($date);
echo json_encode(['enabled'=>pv175_enabled(),'slots'=>$result['slots'],'message'=>$result['message']],JSON_UNESCAPED_UNICODE|JSON_INVALID_UTF8_SUBSTITUTE);
} catch(Throwable $ex) {
error_log('[POLANA V175 slots] '.$ex->getMessage());
http_response_code(503);
echo json_encode(['enabled'=>true,'slots'=>[],'message'=>'Nie można teraz sprawdzić godzin. Spróbuj ponownie.'],JSON_UNESCAPED_UNICODE);
}