PHP Method for getting md5 values for remote http or ftp files

  • 2021-12-09 08:23:07
  • OfStack

PHP Gets the md5 value of the local file:

md5_file("/path/to/file.png");

PHP Gets the md5 value of the remote http file:

md5_file("https://www.baidu.com/s?wd=%E4%BB%8A%E6%97%A5%E6%96%B0%E9%B2%9C%E4%BA%8B & tn=SE_Pclogo_6ysd4c7a & sa=ire_dl_gh_logo & rsv_dl=igh_logo_pc")

PHP Get the md5 value of the remote ftp file:

md5_file("ftp://username:password@192.168.6.1/aa4c319f1b8197e381beeb8c45e6c68d.apk")

If the remote file is large, it will take a lot of time to execute, because it needs to be downloaded first.

Summarize

The above is the site to introduce you PHP remote http or ftp file md5 value method, I hope to help you, if you have any questions welcome to give me a message, this site will reply to you in time!


Related articles: