$connection = mysqli_init();
mysqli_options($connection, MYSQLI_OPT_LOCAL_INFILE, true); //added to be able to run LOAD DATA LOCAL INFILE
@mysqli_real_connect($connection, $url['host'], $url['user'], $url['pass'], substr($url['path'], 1), $url['port'], NULL, MYSQLI_CLIENT_FOUND_ROWS);
// Узнаем fid
$fid = $node->field_image[$node->language][0]['fid'];
// Получаем hash
$hash = db_query("SELECT hash FROM {file_managed} WHERE fid = :fid", array(':fid' => $fid))->fetchField();