darkcarnival Posted October 8, 2006 Share Posted October 8, 2006 hi,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 :) Quote Link to comment https://forums.phpfreaks.com/topic/23361-md5_file-question/ Share on other sites More sharing options...
redarrow Posted October 8, 2006 Share Posted October 8, 2006 example 1http://www.w3schools.com/php/func_string_md5_file.asp Quote Link to comment https://forums.phpfreaks.com/topic/23361-md5_file-question/#findComment-105923 Share on other sites More sharing options...
Daniel0 Posted October 8, 2006 Share Posted October 8, 2006 Something like this should solve your problem.[code]<?php$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";}?>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/23361-md5_file-question/#findComment-105925 Share on other sites More sharing options...
darkcarnival Posted October 8, 2006 Author Share Posted October 8, 2006 ok thank you guys for the pointers, I'll try it out later tonight. Quote Link to comment https://forums.phpfreaks.com/topic/23361-md5_file-question/#findComment-106018 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.