Jump to content


This topic is now archived and is closed to further replies.


md5_file question

Recommended Posts


I'm interested in using the md5_file function as a way to check for a new verison of a script of mine.

currently i have a variable setup that i check but thats too much hassle when i have to update it for bug releases.

this md5_file function looks like something that would easier for me to check, if im wrong let me know.

now i checked on the php official site, but they dont give much detail on it so I'm hoping someone here knows a bit more about the workings of that function.

much thanks :)

Share this post

Link to post
Share on other sites
Something like this should solve your problem.

$old = "the old hash would in some way be stored in this variable";

if(md5_file("http://example.com/the_file.tar.gz") === $old)
echo "A new version has been released";
else {
echo "No updates are available";

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.