Missing ftok() on Windows? Here's my little workaround:
if( !function_exists('ftok') )
function ftok($filename = "", $proj = "")
if( empty($filename) || !file_exists($filename) )
$filename = $filename . (string) $proj;
for($key = array(); sizeof($key) < strlen($filename); $key = ord(substr($filename, sizeof($key), 1)));
NOTE: There *may* be duplicate keys, even if probability is low.
The key's were NOT computed like the original UNIX ftok() because i.e. fileinode() is also missing on windows. Normally ftok() computes a key based on the file inode and the system minor id of the harddrive the file resides.
Behaviour is like PHPs ftok(), -1 is returned if file is missing or $filename is empty, computed int as hex on success.