Added cURL as fallback if allow_url_fopen == 0

If the server configuration doesn't allow remote url fopen, this
solution will fallback using cURL instead.