'); $items = $xml->xpath('channel/item'); if(empty($items)){ print( '
Не удалось найти искомую комбинацию слов.
'); }else{ unset($xml); $sort_proxy = array(); foreach($items as $k=>$item){ $sort_proxy[$k] = IntVal(strtotime($item->pubDate)); if(!empty($item->pubDate)){ $item->pubDate = date('d.m.Y H:i:s', strtotime($item->pubDate)); } if(!empty($item->description)){ preg_match('/]+src\s*=\s*[\"\']([^\"\']+)[\"\'][^>]*>/si', $item->description,$img); $item->description = preg_replace('#.*#USi','', $item->description); $item->description = strip_tags($item->description,''); if(!empty($img[1])) $item->description = ''.$item->description; } if(!empty($item->guid)){ if(strpos($item->guid, "http")===false) $item->guid = ''; } } array_multisort($sort_proxy, SORT_DESC, $items); print( '
    '); foreach($items as $k=>$item){ print( '
  1. '. '

    '. ' '. ' '.$item->title.''. ' '. '

    '. '
    '.$item->guid.'
    '. '
    '.$item->pubDate.'
    '. '
    '.$item->description.'
    '. '
  2. '); } print( '
'); } print( ' '); } ?>