code:
$filename = $url;
$handle = fopen($filename, "r");
$contents = fread($handle, filesize($filename));
fclose($handle);
if (preg_match('<link (?:[^\>]*)href="(.+)">', $content)) {
$i=0;
$rss = array();
while (preg_match('<link (?:[^\>]*)href="(.+)">', $content)) {
$url = explode('<link (?:[^\>]*)href=', $content);
$rss[$i] = $url[0];
$i++;
}
$amount = count($rss);
$i=0;
while ($amount > $i) {
$rssquery = "INSERT INTO rss_link (id, site_id, url) VALUES ('', '$site_id', '$rss[$i]')";
mysql_query($rssquery);
}
}
I Am Guessing, this is straight off the top of my head, This Might Work If $url = The Url Of The Page I Am "indexing"?