Below code worked:
$doc = new DOMDocument('1.0');
$proxy = Config::getVar('proxy', 'http_host').':'.Config::getVar('proxy', 'http_port');
$ch = curl_init(PLUGIN_GALLERY_XML_URL);
$options = array(
CURLOPT_PROXY => $proxy,
CURLOPT_RETURNTRANSFER => true,
);
curl_setopt_array( $ch, $options );
$content = curl_exec( $ch );
$doc->load($content);