Sign in to follow this  
Followers 0
Proph

Verify Download

7 posts in this topic

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!

Share this post


Link to post
Share on other sites



You can only get a checksum from sites that provide it. If nothing is provided, you have no way to verify it.

Share this post


Link to post
Share on other sites

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. :graduated:

Is there any clean way of checking if an exe or zip file is corrupt before launching or extracting it then?

Thanks!

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Well, as I said before, you don't have a way to check unless those checksums are provided.

Share this post


Link to post
Share on other sites

Check the filesize . In most cases the broken downloads have smaller filesize.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0