Autor Zpráva
unlucky
Profil
chci zjistit jestli obrazek A a B jsou stejne.

$a=md5_file(file_get_contents("a.jpg"));
nebo
$b=md5_file("b.jpg");

Co je spravne? Neni u $b jenom md5 stringu?
Medvídek
Profil
unlucky:
Jak píše dokumentace: Calculates the MD5 hash of the file specified by the filename parameter a funkce očekává jako parametr string: string md5_file ( string $filename [, bool $raw_output = false ] )


echo md5_file(file_get_contents("https://justcrypt.it/img/JustCryptIt-LOGO.png"));
Warning: md5_file() expects parameter 1 to be a valid path, string given in /web/com/138481641620927/main.php on line 2 

echo md5_file("https://justcrypt.it/img/JustCryptIt-LOGO.png");
b638db31a766e0cabacdb176b32fd7d4

ALe to jsi si mohl vyzkoušet sám :)
Jan Tvrdík
Profil
unlucky:
Jenom doplním, že md5_file('a.jpg') je v podstatě ekvivalentní md5(file_get_contents('a.jpg')).

Vaše odpověď

Mohlo by se hodit


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm:

0