[ 'method' => 'GET', 'header' => "Authorization: " . $app["other"]["token"] . "\r\n" ] ]); } else { echo("Not using authentication\n"); $ctx = stream_context_create([ 'http' => [ 'method' => 'GET' ] ]); } echo("Fetching...\n"); $data = file_get_contents("https://pluralkit.equestria.dev/v2/systems/$system/fronters", false, $ctx); if (trim($data) !== "" && $data !== false) { echo("Data is valid, saved it\n"); file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$system/fronters.json", $data); } else { echo("Data is invalid\n"); }