[#41139443] swapped fopen call to curl

Replaced dangerous open_url with curl. @Xorlev @sypticus