change curl to file_get_contents