asmith Posted April 5, 2009 Share Posted April 5, 2009 Hi, I'm looking to see if it is possible : I have an image database with lots of images. lets say all are one type. (jpg or maybe png) Is it possible that If a user upload his image, and I could match the image to see if it is already in the database or not? By matching I don't mean matching the names, since the user can upload same image with a different name. I mean it kinda checks to see if the image itself (maybe convert it to hex or something first?) matches the image files in the database? Is it possible? How much time it would require if it is going to search like 10,000 images or more? Or I've missed some easy ways to do it and searching for hard alternatives? Quote Link to comment https://forums.phpfreaks.com/topic/152635-solved-matching-images/ Share on other sites More sharing options...
Daniel0 Posted April 5, 2009 Share Posted April 5, 2009 Store the MD5 hash (or another similar hash from another algorithm) and match against that. You can use md5_file to get the hash. Quote Link to comment https://forums.phpfreaks.com/topic/152635-solved-matching-images/#findComment-801593 Share on other sites More sharing options...
asmith Posted April 5, 2009 Author Share Posted April 5, 2009 Of course !!! Omg I really missed the easy way. Thanks a lot Quote Link to comment https://forums.phpfreaks.com/topic/152635-solved-matching-images/#findComment-801595 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.