Hey I’m wanting to have an integrity check on a software that will be distributed to many different types of servers. Can I use PHP’s filesize() comparisons safely… for example will a filesize that is 745 on my server be 745 across all other servers?
Share
Yes, unless it’s a text file whose line endings were converted.
However, you should not rely on file size alone for integrity checking. Use the md5_file or sha1_file functions instead.