I would like to hash the contents of the downloaded file in MD5. The file will not be saved locally, so it exists only in the tmp directory.
How can i do this? Thanks.
You can use md5_file() or sha1_file() . For example, if your post variable is filevar :
md5_file()
sha1_file()
filevar
$myhash = md5_file($_FILES['filevar']['tmp_name']);
You can use md5_file() even in your temporary file.
MD5() for string and md5_file() for files
MD5()
Source: https://habr.com/ru/post/1346968/More articles:Lua - attempt to call the new method (nil value) - oopEntering data in ffmpeg using named pipes - encodingTime in W3C format - dateOverriding the default values โโof ItemsPanelTemplate in Silverlight 4? - wpfHow to calculate the rotation and translation between two cameras? - opencvPHP Get the md5 remote file? - phpXHTML Testing Page - htmlFacebook fql wrong sort ORDER BY - facebookWhats Hex Dump - What Does It Mean? - hexdumpGet current QNetworkInterface active and connected to the Internet - c ++All Articles