0) { $fileContent = file_get_contents($file2); $lines = explode(PHP_EOL, $fileContent); $firstLine = trim($lines[0]); $secondLine = trim($lines[1]); $givenTime = $firstLine; $currentTimestamp = time(); $givenTimestamp = strtotime($givenTime); if ($secondLine == "Dewald") { if (date("Y-m-d", $currentTimestamp) === date("Y-m-d", $givenTimestamp)) { $testing = $givenTimestamp - $currentTimestamp; if ($testing >= 3600) { // 3600 seconds = 1 hour echo "D_Checking"; exit; } else { echo "Expired"; unlink($file2); } } } if ($secondLine == "Hannes") { if (date("Y-m-d", $currentTimestamp) === date("Y-m-d", $givenTimestamp)) { $testing = $givenTimestamp - $currentTimestamp; if ($testing >= 3600) { // 3600 seconds = 1 hour echo "H_Checking"; exit; } else { echo "Expired"; unlink($file2); } } } } else { echo "NO FILE"; } } } } ?>