Code for fetching LJ contents

    Date: 04/21/05 (PHP Development)    Keywords: web

    [Error: Irreparable invalid markup ('') in entry. Owner must fix manually. Raw contents below.]

    I got a code from one of my friend...

    It fetches the LJ contents in your site... I modified it in appropriate places... But the main problem in this code is that, it is not a generic one. You need to change the code according to various LJ Style... Can anyone help me modifying the code to a generic one so that it suits any LJ design?

    Also i want to make it a template so that it can be imported anywhere... to fit the norma design of anyone's website



    // +-------------------------------------------------------------------------------------------+
    // | ShowLJ version 0.1
    // +-------------------------------------------------------------------------------------------+
    // | This program is free software; you can redistribute it and/or
    // | modify it under the terms of the GNU General Public License
    // | as published by the Free Software Foundation; either version 2
    // | of the License, or (at your option) any later version.
    // |
    // | This program is distributed in the hope that it will be useful,
    // | but WITHOUT ANY WARRANTY; without even the implied warranty of
    // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    // | GNU General Public License for more details.
    // |
    // | You should have received a copy of the GNU General Public License
    // | along with this program; if not, write to the Free Software
    // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
    // | 02111-1307, USA.
    // |
    // +------------------------------------------------------------------------------------------+
    // | Main Author: Mrinal kalakrishnan
    // | Continued By: Sumeet B Mulani
    // | Website: http://sumeet.info/
    // | Continued By: Sutanu Mandal from SPHINX
    // | Website: http://www.wearesphinx.net
    // +------------------------------------------------------------------------------------------+
    // | File: showLJ.php
    // | Description: Contains the PHP Function to show LiveJournal
    // | content in your personal website
    // | Last Update: 20/04/2005
    // +------------------------------------------------------------------------------------------+



    function showLJ()
    {

    $ljsite=''; #Your LJ Site
    $LJ=file($ljsite);
    $copy=0;
    $journal=null;
    $rep=0;
    while (list ($key, $val) = each ($LJ))
    {
    chop($val);

    # This is for S1 style
    if ($copy==0 and ereg("^
    cellpadding=\"2\" cellspacing=\"0\" border=\"0\" summary=\"\"
    class=\"entrybox\">",$val))
    {
    # Use the similar code for displaying S1 Style Journal
    }

    # This is for S2
    if($copy == 0 and ereg("^
    ",$val))
    {
    # For S2 journal Style we may need to modify the Reg-Exp
    $copy=1;
    }
    if ($copy==1)
    {
    $journal.=$val;
    }
    if(ereg("^
    ",$val) and $copy==1) $copy=0;
    }

    echo $journal;
    }

    #For displaying your Livejournal call this function wherever you want

    ?>


    Please help me to modify this code... So that, anyone can use this code for displaying LJ in their site in a customized way

    Source: http://www.livejournal.com/community/php_dev/54368.html

« Help Needed || One Problem »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home