$rss=file_get_contents("http://www.sirketprofilleri.com/feed/");
$dom=new DOMDocument();
$dom->loadHTML($rss);
$items=$dom->getElementsByTagName("item");
$itemsayisi=$items->length;
$itemarray=array();
for ($i=0;$i<$itemsayisi;$i++){
$itemlist=$items->item($i)->childNodes;
for($j=0;$j<$itemlist->length;$j++){
echo $itemlist->item($j)->nodeName." : ".$itemlist->item($j)->nodeValue."
";
switch ($itemlist->item($j)->localName){
case "title":
$itemarray[$i]["title"]=$itemlist->item($j)->nodeValue;
break;
case "link":
$itemarray[$i]["link"]=$itemlist->item($j)->textContent;
break;
case "pubDate":
$itemarray[$i]["pubDate"]=$itemlist->item($j)->nodeValue;
break;
case "category":
$itemarray[$i]["category"][count($itemarray[$i]["category"])]=$itemlist->item($j)->nodeValue;
break;
case "guid":
$itemarray[$i]["guid"]=$itemlist->item($j)->nodeValue;
break;
case "description":
$itemarray[$i]["description"]=$itemlist->item($j)->textContent;
break;
case "content":
$itemarray[$i]["content"]=$itemlist->item($j)->textContent;
break;
}
}
}
print_r($itemarray);
$htmldata="";
foreach ($itemarray as $item){
$htmldata.=''.$item["title"].'';
}
echo ' ';
test için adres http://www.seowarp.net/test.html Kodlar Çalışıyor uydurma değildir.