Invece di file(), usa file_get_contents().