out_class.php
资源名称:BBWPS.rar [点击查看]
上传用户:yttaitong
上传日期:2009-05-10
资源大小:128k
文件大小:1k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
PHP
- <?php
- /*
- [BBWPS!] (C)2006-2010 小蜜蜂版权所有.
- This is NOT a freeware, use is subject to license terms
- 时间:2007年12月
- 描述:
- */
- class OUTFeed {
- var $m_OUTversion = '1.0';
- var $m_XMLversion = '1.0';
- var $m_channel = NULL;
- var $m_FeedItem = '';
- var $m_channelItem = '';
- function OUTFeed($OUTVersion="1.0") {
- $this->__construct($OUTVersion);
- }
- function __construct($OUTVersion){
- $this->m_OUTversion=$OUTVersion;
- $this->m_channel ="<?xml version="".$this->m_XMLversion."" encoding="gbk"?>n";
- $this->m_channel.="<out version="".$this->m_OUTversion."">n";
- }
- function __destruct(){
- unset($this->m_channelItem,$this->m_channel,$this->m_FeedItem);
- }
- function addFeedItem($ItemArray) {
- $this->m_FeedItem .= "t<item>n";
- foreach ($ItemArray as $tag=>$text){
- $text=rawurlencode($text);
- $this->m_FeedItem .= "tt<".$tag.">".$text."</".$tag.">n";
- }
- $this->m_FeedItem .= "t</item>n";
- }
- function releaseFeed() {
- header("Content-Type: text/xml");
- print $this->m_channel;
- print $this->m_FeedItem;
- print "</out>";
- }
- }
- ?>