note 39830 deleted from function.file by tularis

From: Date: Fri, 30 Nov 2007 12:16:29 +0000
Subject: note 39830 deleted from function.file by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-132687@lists.php.net to get a copy of this message
Note Submitter: skipjack at skipjack dot info ---- this a little function I wrote that checks if two ascii files are the same. it opens the file then removes the spaces then coverts the crc32 to base 10 and compares the results. function fcheck($tool) { if(fopen("file.01", "r") != FALSE){ $fp1 = 'file.02'; $fp = 'semcond.01'; $data = implode(" ", file($fp)); $data1 = implode(" ", file($fp1)); $test1 = (dechex(crc32($data))); $test2 = (dechex(crc32($data1))); if($test1 == $test2) $sfv_checksum = 'TRUE'; else $sfv_checksum = 'FALSE'; return $sfv_checksum; } }

« previous php.notes (#132687) next »