Re: crc check for JPEG file exists
| From: | Daniel Brown | Date: | Wed, 27 Feb 2008 14:28:31 +0000 |
| Subject: | Re: crc check for JPEG file exists | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-270288@lists.php.net to get a copy of this message | ||
On Wed, Feb 27, 2008 at 1:49 AM, Olav Mørkrid <olav.morkrid@gmail.com> wrote:
> hello
>
> is crc32() an acceptable way of managing whether a JPEG file exists
> (in a database or similar collection)?
Not really. It won't always properly compare the binary data, and
it's also slower than MD5, SHA1, and the like.
Not only that, but you can use an MD5 check right in your SQL
query (at least with MySQL) rather than needing to pass to the PHP
script and back.
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>