Created
March 30, 2009 11:18
-
-
Save BlackMac/87747 to your computer and use it in GitHub Desktop.
Logs your time in timetrack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!isset($_GET['h'])) { | |
echo "No Hash given"; | |
exit; | |
} | |
$logtime=date("Y-m-d\TH:i:s"); | |
$action="#"; | |
if ($_GET['d']=="in") $action="+"; | |
if ($_GET['d']=="out") $action="-"; | |
$logline=$action.'['.$logtime.'] ***'.$_GET['d'].'***'."\n"; | |
$file=fopen('logs/'.$_GET['h'].'.log', 'a'); | |
fputs($file, $logline); | |
fclose($file); | |
echo $logline; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment