PHP » I/O » md5_file()

Syntax:
string md5_file(string filename)
filename
The name of the file.

Returns an md5 hash for a file.

This function returns an 128-bit md5 hash of a file and can be used to verify the integrity of a file. If the call fails, FALSE is returned.

Examples

Code:
<?php

print "md5 hash for log.txt: " . md5_file("log.txt");

?>
Output:
md5 hash for log.txt: 75efaab9a36ee3cd967d477865595a0f
Explanation:

An md5 hash for log.txt is generated and printed.

See Also: