use file_get_content instead of gd resource