1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Help..Please, i'm in trouble....

Discussion in 'Blogging' started by Jeehan, Oct 24, 2007.

  1. #1
    I want to show the last post (title, date, pciture, body) from my blogspot blog at my web site. ( when ever i post a new blog it will also show on my other site)


    Please help me how to do it. How to show my blogs feed on my site.

    Thnx.
     
    Jeehan, Oct 24, 2007 IP
  2. Houdy

    Houdy Peon

    Messages:
    267
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I just saw this on another forum, didn't test it so if it doesn't work please don't shoot the messenger! I suggest you create a backup of any page you attempt to edit or test this on a new page first!



    * Download this file http://www.wealthontap.com/bonuses/magpierss.zip and unzip it

    * If you use ftp then upload the folder into the root directory of your site, if not then log into WEBePanel and go to file manager

    * You will then need to create a new directory in the root of your site called magpierss and upload the 4 rss_ files

    * Create another directory called extlib inside magpierss and upload the Snoopy.class.inc file into it

    * You will also need to create a folder called cache in your root directory if you haven't already got one and change permissions to 766

    * Next you need to open and edit the file of the page on your site and place the following code wherever on the page you would like the feed to be displayed. Where it says http://www.yoursite.com/blog/feed replace that with the url of the feed you wish to display.

    <?php
    require_once('magpierss/rss_fetch.inc');
    error_reporting(E_ERROR);
    $rss = fetch_rss('http://www.yoursite.com/blog/feed');
    if ($rss) {
    $items = array_slice($rss->items, 0, 5);
    foreach ($items as $item )
    { echo '<li><a href="'.$item['link'].'">'.$item['title'].'</a> - '.$item['description'].'</li>'; }
    }
    else
    {
    echo '<h2>Error:</h2><p>'.magpie_error().'</p>';
    }
    // Restore original error reporting value
    @ini_restore('error_reporting');
    ?>


    * The last thing you will need to do is change the filename extension from .html to .php. Don't worry it won't hurt your site at all it just means that you can run php scripts on the page.

    * Lastly you can change the number of posts displayed to whatever you like by changing the number 5.
     
    Houdy, Oct 24, 2007 IP
  3. gauharjk

    gauharjk Notable Member

    Messages:
    2,430
    Likes Received:
    135
    Best Answers:
    0
    Trophy Points:
    230
    #3
    Excellent Thinking...

    Excellent Script...
     
    gauharjk, Oct 26, 2007 IP
    Bernard likes this.