there is someone who knows how to write php in a script to convert a site's news into RSS feeds. For example, feed43.com, try it out to understand the mechanism. Thank you.
I tried to write this code, but I'm not capable. Help me please, it's not difficult.
function example_extract_link_feedrss($url){
$link = file_get_contents($url);
$str = trim(preg_replace('/\s+/', ' ', $str));
preg_match('/\<h3\>"\>(.*)/i',$str,$titleNoticeRSS);
return $titleNoticeRSS[1];
}
}
Do NOT use regex to parse HTML! Please see here: RegEx match open tags except XHTML self-contained tags
Instead, use the DOM classes: http://php.net/manual/en/book.dom.php