Proph Posted November 11, 2010 Share Posted November 11, 2010 What would be the best way to verify a download from a website? I know I can check the file size to verify... but I am assuming this may not be a perfect way to verify. Currently I have a text file on my site with the md5hash for each file I am having my program download from my website and I check the file with that md5 hash... but if I wanted to have my program download from many different websites it would not be possible for me to put the md5 hash in a text file on my site since other sites may change their files. 1. Is it possible to get the md5 hash from a file on a website before downloading it? 2. Or is there some other simular thing I can get before downloading the file which I can use to verify the download once it is complete? Thanks! Link to comment Share on other sites More sharing options...
Richard Robertson Posted November 11, 2010 Share Posted November 11, 2010 You can only get a checksum from sites that provide it. If nothing is provided, you have no way to verify it. Link to comment Share on other sites More sharing options...
Proph Posted November 15, 2010 Author Share Posted November 15, 2010 You can only get a checksum from sites that provide it. If nothing is provided, you have no way to verify it.I was afraid of that. Is there any clean way of checking if an exe or zip file is corrupt before launching or extracting it then?Thanks! Link to comment Share on other sites More sharing options...
Richard Robertson Posted November 15, 2010 Share Posted November 15, 2010 Corrupt is vaguely defined. Even a corrupted executable file can run without errors. The corruption may have occurred in an icon resource changing one pixel. It may have been in the code and caused an error. You never know. Are you consistently having problem downloads? If you are, I'd suggest talking to your ISP. Link to comment Share on other sites More sharing options...
Proph Posted November 20, 2010 Author Share Posted November 20, 2010 Corrupt is vaguely defined. Even a corrupted executable file can run without errors. The corruption may have occurred in an icon resource changing one pixel. It may have been in the code and caused an error. You never know.Are you consistently having problem downloads? If you are, I'd suggest talking to your ISP.No I don't have issues downloading. I have a program which downloads certain tools from other websites so that my program may use them. It works fine. Right now I place a txt file on my host which has the md5 hash of each file my program downloads and I have the files also hosted on my host to ensure the files always match the md5. But I was wanting to have my program download these files directly from the other websites. since I have no way of knowing each files md5 I have no way of knowing if the files are correct. Link to comment Share on other sites More sharing options...
Richard Robertson Posted November 20, 2010 Share Posted November 20, 2010 Well, as I said before, you don't have a way to check unless those checksums are provided. Link to comment Share on other sites More sharing options...
Juvigy Posted November 22, 2010 Share Posted November 22, 2010 Check the filesize . In most cases the broken downloads have smaller filesize. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now