کد PHP:
<?php
echo '<meta charset="utf-8">';
error_reporting(e_all);
$xml = file_get_contents('http://yoursite.com/feed/');
// mung the xml because we do not have the namespace information
$xml = str_replace('content:encoded', 'content__encoded', $xml);
$xml = str_replace('isc:', 'isc__', $xml);
// convert the xml to an object
$obj = simplexml_load_string($xml, 'simplexmlelement', libxml_nocdata);
// get some fields
foreach($obj->channel->item as $item)
{
$item_title = $item->title;
$item_link = $item->link;
$item_description = $item->description;
$item_enclosure = $item->enclosure->attributes()->url;
if(strpos($item_title, 'موزیک ویدئو')) return;
echo "<br/><strong>$item_title</strong> $item_description<br/>$item_enclosure";
}
?>