Are there any way to send an http request to know for example the md5 of a file?

I need it because I have a php script that downloads a remote file from http and then writes it locally.

I would like to check if it was transfered right.

Thanks