md5sums of downloaded files are wrong |
md5sums of downloaded files are wrong |
larry78723 |
Mar 8 2022, 10:00 AM
Post
#1
|
Member Group: Members Posts: 39 Joined: 5-March 20 Member No.: 27,220 |
I'm having a problem that files downloaded from my site don't have the same md5sum as the original file. Here's an example:
md5sum of original file: a00bd61088cf4f4a0138d51f24e554f0 md5sum of downloaded file: 6f23af927c0a3348345ed1415fb89e36 I suspect that something is inserting bits into the downloads. I've scrubbed the code for hidden spaces but found none. Here's the code I'm using: CODE <?php function mydloader($filename=NULL) { if( isset( $filename ) ) { $ext = pathinfo($filename, PATHINFO_EXTENSION); { if ($ext == '.iso') header('Content-Type: application/x-cd-image'); elseif ($ext =='.gz') header('Content-Type: application/zip'); else header('Content-Type: octet-stream'); } header('Content-Length: ' .filesize($filename)); header("Content-Disposition: attachment; filename={$filename}"); header('Pragma: no-cache'); header('Expires: 0'); readfile($filename); } else { echo "isset failed"; } } mydloader($_GET["f"]); //passed from calling script I'd appreciate some help on this. |
Christian J |
Mar 9 2022, 04:44 PM
Post
#2
|
. Group: WDG Moderators Posts: 9,665 Joined: 10-August 06 Member No.: 7 |
What was the cause?
|
Lo-Fi Version | Time is now: 19th May 2024 - 04:53 AM |