Replaced file_get_contents with curl