Replaced file_get_contents with the cURL equivalent