"; # Then we'll make a unique hash... $UniqueHash=bin2hex(md5($UniqueFileID)); # DEBUG # print "

"; # Lock the file. $FilePointer=fopen($CounterFile,"r+"); flock($FilePointer,LOCK_EX); # Read in the values in the counter file. while ($FileCount = fscanf ($FilePointer, "%s\t%s\n")) { list($HashID,$Count)=$FileCount; $CountHash[$HashID]=$Count; } # Increment the number of accesses to the counter file. $CountHash[$UniqueHash]=$CountHash[$UniqueHash]+1; # Rewind to the beginning of the file rewind($FilePointer); # Iterate through each element of the hash and write it to the file. # By dropping all the hashes into an array. $CountKeys=array_keys($CountHash); # Step through the array to write them to the file. foreach($CountKeys as $TheKey) { fwrite($FilePointer,"$TheKey {$CountHash[$TheKey]}\n"); } # Unlock and close the file. flock($FilePointer,LOCK_UN); fclose($FilePointer); # print out the result. # print "This page has been accessed {$CountHash[$UniqueHash]} times."; ?>

Select the Nite I's product you are interested in by using the

Quick Product Selection pull-down list below!

Return to the Nite I's Home Page
Return to the Nite I's Product Catalog