Phpbb mod input (fopen change to curl)

i have spent half the night trying to figure out how to change the fopen url part of this script since url fopen is disable here and cant for the life of me figure out how to change it to curl instead
code snipet:
// retrieve the data from the given url
if ($this->_fp = @fopen($RSS_URL,‘r’))
// read the file into our data in 4k chunks
while ($data = fread($this->_fp, 4096))
// parse our xml data until we find the end of our file
xml_parse($this->_xml_parser, $data, feof($this->_fp))
or die(sprintf(‘XML error: %s at line %d’,

$result = true;

return $result;
this mod add rss function to phpbb rss feed from other site are post right in a forum it a asume script but needs url_fopen to work and that a problem here. so if someone could help me change the code i would be most thankful