Forum Moderators: coopster
// close the data source
if ($this->_fp)
{
fclose($this->_fp);
}// destroy our xml parser
xml_parser_free($this->_xml_parser);
}// parse the xml
function parse($RSS_URL)
{
$prev_error_reporting = error_reporting();
error_reporting(E_ERROR);$result = false;
$data = '';// 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',
xml_error_string(xml_get_error_code($this->_xml_parser)),
xml_get_current_line_number($this->_xml_parser)));$result = true;
}
}
error_reporting($prev_error_reporting);return $result;
}
Thanks
as I mentioned above that would be the loguc to replicate what you are doing
give it a try, there are many examples of using curl in the manual
[php.net...]
just remember you will be pulling the page as a whole and then working with that.
If you really wanted to keep your code as is you could use curl to grab the whole page and then save it to your server and use your existing code on that.