The easiest way to go would be to use cURL to get the info as XML from the rss url, and then use simplexml to turn the rss XML into a traversable object. Use Xpath to get the parts of the XML you want to store in the DB. Finally, move the data to the DB.
Example
Sorry, I was rushing out the door when I saw your question. I actually wrote a really simple script a week ago to do most of what you are talking about:
//cURL to get RSS as XML
function get_rss($feed_url) {
$feed_request = curl_init($feed_url);
curl_setopt($feed_request, CURLOPT_RETURNTRANSFER, 1);
$feed_xml = curl_exec($feed_request);
curl_close($feed_request);
return $feed_xml;
}
function rss2sql($xml, $sql) {
//simplexml to convert XML to objects
$rss_xml = simplexml_load_string($xml);
//XPath to get an array of items in RSS
$rss_items = $rss_xml->xpath('//item');
if(!$rss_items) {
die("No Items In RSS Feed!");
} else {
// Create Prepared Statement for Insert and bind variables.
$item_insert = $sql->prepare("INSERT INTO rsstable VALUES (?, ?, ?, ?)");
$item_insert->bind_param('ssss', $item->title,$item->link,$item->guid,$item->description);
//Loop through each item and execute prepared statement
foreach($rss_items as $item) {
$item_insert->execute();
}
}
}
$sql = new mysqli("localhost", "my_user", "my_password", "world");
$rss_url = "http://example.org/rssfeed";
$rss_xml = get_rss($rss_url);
rss2sql($rss_xml, $sql);