note 68651 added to function.sha1-file

From: Date: Sat, 05 Aug 2006 03:02:25 +0000
Subject: note 68651 added to function.sha1-file
Groups: php.notes 
Request: Send a blank email to php-notes+get-115561@lists.php.net to get a copy of this message
checking the sha1 of the file. ideal for download scripts making sure the file the user is downloading is not currupt by checking the sha1 key <?php $filename = './Path/To/Your/File.zip'; if (file_exists($filename)) { echo"i see the file"; } else { echo "recheck the link file maybe broken"; } $file = sha1_file('./Path/To/Your/File.zip'); echo"<br>is file hash valid?"; echo"hash = add the hash here<br>"; echo"hash of file :"; print($file); ?> ---- Server IP: 83.138.144.80 Probable Submitter: 81.79.34.38 ---- X-Spam-Status: No, hits=3.3 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER, HTML_MESSAGE autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.sha1-file.php Edit -- https://master.php.net/note/edit/68651 Del: integrated -- https://master.php.net/note/delete/68651/integrated Del: useless -- https://master.php.net/note/delete/68651/useless Del: bad code -- https://master.php.net/note/delete/68651/bad+code Del: spam -- https://master.php.net/note/delete/68651/spam Del: non-english -- https://master.php.net/note/delete/68651/non-english Del: in docs -- https://master.php.net/note/delete/68651/in+docs Del: other reasons-- https://master.php.net/note/delete/68651 Reject -- https://master.php.net/note/reject/68651 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#115561) next »