#!/usr/bin/env php is_numeric($options['connect_timeout'] ?? null) ? (int)$options['connect_timeout'] : 3, CURLOPT_TIMEOUT => is_numeric($options['timeout'] ?? null) ? (int)$options['timeout'] : 5, CURLOPT_ACCEPT_ENCODING => '', //Enable all encodings CURLOPT_HTTPHEADER => [ 'Connection: close', ], CURLOPT_RETURNTRANSFER => true, ]); $content = curl_exec($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($httpCode !== 200 || !is_string($content)) { die(1); } $content = rtrim($content, "\n\r"); if (!str_starts_with($content, '') || !str_ends_with($content, '') || !str_contains($content, '/scripts/api.js')) { die(2); }