- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
<?
$xml = xml_parser_create();
xml_parser_set_option($xml, XML_OPTION_SKIP_WHITE,1);
xml_parse_into_struct($xml, file_get_contents($url), $el, $fe);
xml_parser_free($xml);
for($i=0; $i<5; $i++){
$m = $fe['ITEM'][$i];
$title = $el[$m+1]['value'];
$link = $el[$m+2]['value'];
$time = $el[$m+4]['value'];
$desc = mb_substr( $el[$m+3]['value'], 0, 80, 'UTF-8');
echo '<br/><strong>'.$title.'</strong> <br/>['.
$time.']<br/>'.$desc.'<br/><a href="'.$link.'">читать...</a>';
}
7ion 08.03.2011 09:23 # 0
Lure Of Chaos 08.03.2011 22:44 # 0