This is not possible without downloading it or a remote server providing information (web service, HTML page, etc.).
You can use md5(file_get_contents("http://remotelocation/file")) to download the file and calculate the md5 hash if your PHP installation is configured to open remote threads. But this will download the full file.
source share