Reputation: 79
Just a quick question, is it possible to verify the files downloaded from FTP? I am currently using ftp_get()
to get my files. The only way I can think of is using ftp_size()
to compare the locally saved files.
Upvotes: 2
Views: 492
Reputation: 975
If you're verifying it against another file, then use sha1 hashes to compare.
http://php.net/manual/en/function.sha1-file.php
If you just want to know if the download itself completed, rely on the return of the ftp_get method
if(!ftp_get($myfile)) return 'damn';
Upvotes: 1