2
0
Files
ausbildungschule/Zweites Jahr/skipass/skipass.php
2025-11-19 15:13:38 +01:00

59 lines
1.1 KiB
PHP

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
</body>
</html>
<?php
/*
$now = date(DATE_RFC2822, time()); // current time
$userIP = $_SERVER['REMOTE_ADDR'] ; // users ip
$file = "access_log.txt";
$fp = fopen($file, 'a') or die ("Cannot open file"); // open file for writing
if (countLines($file) < 2) {
$txt = "Count | Date | IP\n";
fwrite($fp, $txt);
$count = countLines($file);
$txt = "$count | $now | $userIP\n";
fwrite($fp, $txt);
echo countLines($file) -1;
} else {
$count = countLines($file) - 1;
$txt = "$count | $now | $userIP\n";
fwrite($fp, $txt);
echo countLines($file) - 1;
}
function countLines($currentFile){
return count(file($currentFile));
}
fclose($fp);
*/
function getLiftLength(string $dataName,int $passID):int {
$file = "LogSkipass.txt";
$fp = file(fopen($file, 'a')or die($result = 0)); // file opened and made to an array
foreach ($fp as $line) {
}
return $result;
}