Added an if statement to use file_get_contents if curl is not available