I am designing a website for someone at the moment and they want a preview of thier wordpress blog on thier home page(not blog home page)

Is there a good way to do this automatically so that it updates itself whenever a new blog is posted or will it be a lot easier to just do it manually?

I have a completly free reign over what languages and how the home page will be coded.

Any help greatly appreciated.

just parse the xml from the rss feed...

<?PHP
 
	/******************************************************************************************************************
	   RSS PARSING FUNCTION
	******************************************************************************************************************/
 
	//FUNCTION TO PARSE RSS IN PHP 4 OR PHP 4
	function parseRSS($url) { 
 
	//PARSE RSS FEED
        $feedeed = implode('', file($url));
        $parser = xml_parser_create();
        xml_parse_into_struct($parser, $feedeed, $valueals, $index);
        xml_parser_free($parser);
 
	//CONSTRUCT ARRAY
        foreach($valueals as $keyey => $valueal){
            if($valueal['type'] != 'cdata') {
                $item[$keyey] = $valueal;
			}
        }
 
        $i = 0;
 
        foreach($item as $key => $value){
 
            if($value['type'] == 'open') {
 
                $i++;
                $itemame[$i] = $value['tag'];
 
            } elseif($value['type'] == 'close') {
 
                $feed = $values[$i];
                $item = $itemame[$i];
                $i--;
 
                if(count($values[$i])>1){
                    $values[$i][$item][] = $feed;
                } else {
                    $values[$i][$item] = $feed;
                }
 
            } else {
                $values[$i][$value['tag']] = $value['value'];  
            }
        }
 
	//RETURN ARRAY VALUES
        return $values[0];
	} 
 
 
	/******************************************************************************************************************
	  SAMPLE USAGE OF FUNCTION
	******************************************************************************************************************/
 
	//PARSE THE RSS FEED INTO ARRAY
	$xml = parseRSS("http://worldthreat.net/?feed=rss2");
 
	//SAMPLE USAGE OF 
	foreach($xml['RSS']['CHANNEL']['ITEM'] as $item) {
	        echo("<p class=\"indexBoxNews\"><a href=\"{$item['LINK']}\" target=\"_blank\" class=\"indexBoxNews\">{$item['TITLE']}{$link}</a></p>");
	}
 
?>

thats amazing work world threat.

With that php script its literlly dump the whoe thing in the div i want i to appear in and change

//PARSE THE RSS FEED INTO ARRAY
	$xml = parseRSS("http://worldthreat.net/?feed=rss2");

to reflect the actually addres of the rss feed in the blog?

Or do

'RSS']['CHANNEL']['ITEM']

all need defining somehow as well.

This article has been dead for over six months. Start a new discussion instead.