Skip to content

Instantly share code, notes, and snippets.

@Echocage
Created August 9, 2016 06:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Echocage/052da5e3d1a20def8f52bae8ffa836dd to your computer and use it in GitHub Desktop.
Save Echocage/052da5e3d1a20def8f52bae8ffa836dd to your computer and use it in GitHub Desktop.
function timeLookup($name)
{
global $file;
$ptfile = fopen($file, 'r');
while ($line = fgets($ptfile)) {
$line = trim($line);
$arr = str_getcsv($line);
if ($arr[0] == $name) {
echo $arr[1];
return;
}
}
echo "Timestamp not found";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment