Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder ajhauser's Avatar
    Join Date
    Nov 2007
    Location
    Earlville. It's where Earls come from.
    Posts
    226
    Thanks
    74
    Thanked 1 Time in 1 Post

    "Bio" site aggregator

    I am thinking about putting together a website that displays multiple feeds from the different websites and services I am involved with. This is probably a stupid question, but how would some of you go about the process of creating a personal site that pulled and displayed feeds from multiple sources all in one location?

    I'm curious about methods and options, as this is entirely new territory for me.

    I was thinking it would be neat to have 2 different views possible: 1 would be more of a dashboard look with different modules to display feeds and updates, and 2 would just be a single column displaying everything in order by date like an RSS reader.

    Very curious.
    Thanks!

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,495
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    Very easy to do using PHP.

    Give us an example of a couple of those sites (the RSS feeds),
    and what info you wish to pull out of the feeds.

  • #3
    Regular Coder ajhauser's Avatar
    Join Date
    Nov 2007
    Location
    Earlville. It's where Earls come from.
    Posts
    226
    Thanks
    74
    Thanked 1 Time in 1 Post
    I was thinking text for recent blog posts here:
    http://hauserdesigngroup.com/wordpress/feed/

    Recent twitter posts and facebook posts WITHOUT relying on the clunky widgets provided.

    In the future there would be 2 or 3 other RSS feeds.

    At this point, that's essentially it.

  • #4
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,495
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    Here's an example using your RSS link:

    PHP Code:
    <?php  
    // rss page - 
    $feed_url "http://hauserdesigngroup.com/wordpress/feed/";
     
    // INITIATE CURL. 
    $curl curl_init(); 

    // CURL SETTINGS. 
    curl_setopt($curlCURLOPT_URL,"$feed_url"); 
    curl_setopt($curlCURLOPT_RETURNTRANSFER1); 
    curl_setopt($curlCURLOPT_CONNECTTIMEOUT0); 

    // GRAB THE XML FILE. 
    $xmlFile curl_exec($curl); 

    curl_close($curl); 

    // SET UP XML OBJECT.
    $xml simplexml_load_string($xmlFile); 

    // DISPLAY ONLY 5
    $count=5;

    foreach (
    $xml->channel->item as $item) { 
    if(
    $count 0){
    // In case they have non-closed italics or bold, etc ... 
    echo"</i></b></u></a>\n";
    // Remove strange characters that cannot be defined ...
    $desc preg_replace('/[^\x20-\x7F]+/'''$item->description);
    $title preg_replace('/[^\x20-\x7F]+/'''$item->title);
     
    echo

    <div style='font-family:arial; font-size:.8em;'>  
    <b>"
    .$title."</b><br />".
    $desc." <br />
    Add your own read more link ... <a href='{$item->guid}'>read more</a> 
    <br /><br /> 
    </div> 
    "
    ;
    }
    $count--;  


    ?>

  • Users who have thanked mlseim for this post:

    ajhauser (09-12-2012)

  • #5
    Regular Coder ajhauser's Avatar
    Join Date
    Nov 2007
    Location
    Earlville. It's where Earls come from.
    Posts
    226
    Thanks
    74
    Thanked 1 Time in 1 Post
    Oh man - thank you! I look forward to checking this out in depth.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •