首页 > PHP > PHP的RSS生成类

PHP的RSS生成类

2010年01月11号
查看评论 发表评论 957次浏览

类的调用:

            $rss = new UniversalFeedCreator();
            $rss->title = “Daily “.$cateArr[$k].” feed from phpzh.com”;
            $rss->link = “http://www.phpzh.com”;
            $rss->description = “Daily top downloaded videos in savevideo.org “.$cateArr[$k].” category.”;
            $softList = $SQL;
            if (is_array($softList) && count($softList) > 0) {
                foreach ($softList as $rs) {
                    $item = new FeedItem();
                    $item->title = $rs['title'];
                    $item->link = ‘http://www.phpzh.com/v.php?id=’.$rs['id'];
                    $item->description = $rs['content'];
                    $rss->addItem($item);
                }
                $rss->saveFeed(“RSS2.0″, $_SERVER["DOCUMENT_ROOT"].”/rss/rss_”.spastr($cateArr[$k]).”.xml”);
            }
        }

页面: 1 2

类别PHP 标签
  1. mbt shoes uk
    发表于 2010年06月17号 23时52分35秒 | 1楼

    You are so right… God bless you for what you wrote.

  2. lebron basketball shoes
    发表于 2010年06月28号 08时43分05秒 | 2楼

    I like it! Very appropriate. Thank you.

  3. christian louboutin strappy platform sandal
    发表于 2010年07月02号 19时59分36秒 | 3楼

    I definitely agree,is like the saying

  4. womens swimwear bikinis
    发表于 2010年07月10号 14时17分24秒 | 4楼

    You do the big deal and good deal.

  5. lacoste polo shirts
    发表于 2010年07月11号 03时51分27秒 | 5楼

    Memories are made of this – thanks for sharing Hope …

  6. louboutin sale
    发表于 2010年07月21号 09时36分59秒 | 6楼

    Wonderful news…

  7. miu miu handbag sale
    发表于 2010年07月25号 15时22分21秒 | 7楼

    Thanks.Keep up the good work

  8. lacoste t-shirts
    发表于 2010年07月26号 11时48分47秒 | 8楼

    Very much like this.

你必需 登陆 才能发表评论.