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.

Php+rss

Discussion in 'PHP' started by gila, Nov 14, 2006.

  1. vishwaa

    vishwaa Well-Known Member

    Messages:
    271
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    138
    #41
    I'm not sure. But all my rss feeds are getting validated successfully even without a single warning.

    Here is my reference that uses date('r',$timestamp) to get a valid date for RSS 2.0 feed.
    http://in2.php.net/manual/en/function.date.php#70667

    Here is the standard for RSS - http://blogs.law.harvard.edu/tech/rss
    SEMrush
     
    vishwaa, Dec 1, 2006 IP
    SEMrush
  2. crazyden

    crazyden Guest

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #42
    Hm... Why do not you use the Magpie RSS - t is really cool!
     
    crazyden, Dec 1, 2006 IP
  3. gila

    gila Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #43
    still got problem..headache...

    I dunno what happend for me, the date and time still got same problem. who can help me solve this problem?

    Thank You

    anyone can help me, pls.

    TQ
     
    gila, Dec 4, 2006 IP
  4. vishwaa

    vishwaa Well-Known Member

    Messages:
    271
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    138
    #44
    The problem might be the difference between your local timezone and server timezone.

    I'm not sure though.
     
    vishwaa, Dec 7, 2006 IP
  5. rcade

    rcade Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #45
    I use the following code to turn a PHP time value (called $date_val) into a valid RSS 2.0 date:

    $rss_date = date("D, d M Y H:i:s O", $date_val);

    For more information, the current RSS 2.0 specification is here:

    http://www.rssboard.org/rss-specification
     
    rcade, Dec 8, 2006 IP
  6. matthewrobertbell

    matthewrobertbell Peon

    Messages:
    781
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #46
    Crazyden - Magpie is for parsing RSS feeds, but gila want to create feeds using php.
     
    matthewrobertbell, Dec 8, 2006 IP
  7. gila

    gila Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #47
    I alreadly set my local timezone to +0800 and server timezone also +0800 but dunno why that rss'article time can be fatser 4 hour compare orginally.:confused:
     
    gila, Dec 10, 2006 IP
  8. gila

    gila Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #48

    
    $res = mysql_query("SELECT topic,newsid,desc postdate,author FROM news WHERE display = 1 ORDER BY postdate DESC LIMIT 0,10");
    
    
    while ($data = mysql_fetch_object($res)) {
    
        $item = new FeedItem(); 
        $item->title = $data->topic;
        $item->link = 'http://mrd.com/news.php?n='. $data->newsid;
        $item->description = $data->desc;
         $item->date =  $data->postdate;
        $item->source =  "http://www.mrd.com";
        $item->author = $data->author;
        $rss->addItem($item);
    }
    
    
    Code (markup):
    How to change like your format? Thank You.:confused:
     
    gila, Dec 10, 2006 IP
  9. gila

    gila Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #49
    I still cannot solve this problem, got anyone can try to help me?

    Thank You.
     
    gila, Dec 12, 2006 IP
  10. gila

    gila Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #50
    my rss date display like that:

    <dc:date>2007-01-16T20:23:50+08:00</dc:date>


    is it correct or not?

    Thank You.
     
    gila, Jan 16, 2007 IP
  11. falcondriver

    falcondriver Well-Known Member

    Messages:
    963
    Likes Received:
    47
    Best Answers:
    0
    Trophy Points:
    145
    #51
    read the thread again from the start, there are already different solutions in here but all you do is making "its not working"-posts without letting anyone know what you tried or how your source code looks like now.
     
    falcondriver, Jan 17, 2007 IP