View Single Post
Old 01-31-2009, 06:37 PM  
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,372
heres a small snippet, just an example how its done, but you would need to build a db of sites that it would parse.

and of course change published to future

PHP Code:
<?php
$how_many
=15//how many posts to display
require('blog1/wp-config.php'); //the path to the wp-config file of the blog I want to use
$news=$wpdb->get_results("SELECT 'ID','post_title','post_content' FROM $wpdb->posts WHERE 'post_type'=\"post\" AND 'post_status'=\"publish\" ORDER BY post_date DESC LIMIT $how_many"); 

foreach(
$news as $np){
printf ("<div class='normalText'>%s</div>"$np->post_content);
}

?>
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote