Create php function to read file