You have two questions:
# 1, you can calculate the MD5 hash in several ways:
- Do the way you do it and load PHP as a string and use PHP
md5() - Use php
md5_file() - Starting with PHP 5.1+, you can use the PHP threading API with any of
md5or md5_file, so as not to load memory completely. exec() md5sum- MySQL
md5()
, . , , md5 exec , PHP md5_file . , , .
# 2, mysql_real_escape_string , blob , (!) INSERT. , / DB 3x 1x 2x PHP.
PHP5 . , , , , blob blob . PHP docs mysqli_stmt::send_long_data : INSERT - blob, .
, API , md5_file, exec system md5, INSERT, , !