jeah i already found out about that, but it's just that there isn't anyway for me to convert those bytes to a decent value in php i can get alot of numbers out of it.. but none of them makes sence
Try N2 for the unpack string, for the unsigned 64 bit int. It's a bit of a munge, but it *might* work. It seems to be a bit hit and miss and works on some of my boxes and not on others.
<?php // windows systemtimeasfiletime to unix timestamp // wstft_to_unixtime(byte[8]) function wstft_to_unixtime($bytes) { $time_hi = array_shift( // grab first element of array returned by unpack unpack('I', substr($bytes, 4)) // skip first 4 bytes, unpack last 4 bytes as unsigned integer );
// $time_hi is now equal to the original 64-bit integer bitshifted 32 steps to the right (/= 2^32) // 100ns * (2^32) = 429.4967296 seconds // thus $time_hi now consists of the number of 429.4967296-second intervals between 1601 and 1970
// there are 116444736000000000 100-nanosecond intervals between jan1 1601 and jan1 1970
$time_hi -= 27111902.8; // remove 1601-1970 time difference (also shifted 32 steps to the right) $time_hi *= 429.4967296; // turn into seconds
return $time_hi; } ?>
*Edit: didn't know bcmath was bundled with php, the above would only be useful if you for some reason don't have bcmath.
I attached a PHP file who admin ban ( work perfectly). You can find in this your response windstyle . With this file you can show, modify, delete banned player.
It don't work alone because this source it's only a part of a admin platin for LFS serveur on Unix system (FRH Team server ). But with little modification it can work alone as you want. ( $no_proc is used only to find path of the ban file because it's for our admin platin, you must modify this particularity for you and remove SESSION part )
If you want you can modify and release it as you want on your name but just specify who is the first developper thank's . It's also on GNU Licence like all my sources.