<?php
/****************************************************
SIMPLEPIE
A PHP-Based RSS and Atom Feed Framework
Takes the hard work out of managing a complete RSS/Atom solution.
Version: 1.0 Beta 2
Updated: 30 May 2006
Copyright: 2004-2006 Ryan Parman, Geoffrey Sneddon
http://simplepie.org
*****************************************************
LICENSE:
GNU Lesser General Public License 2.1 (LGPL)
http://creativecommons.org/licenses/LGPL/2.1/
*****************************************************
Please submit all bug reports and feature requests to the SimplePie forums.
http://simplepie.org/support/
****************************************************/
class SimplePie {
// SimplePie Information
var $name = 'SimplePie';
var $version = '1.0 Beta 2';
var $build = '20060530';
var $url = 'http://simplepie.org/';
var $useragent;
var $linkback;
// Run-time Variables
var $rss_url;
var $encoding;
var $xml_dump = false;
var $caching = true;
var $max_minutes = 60;
var $cache_location = './data/simplepie_cache';
var $bypass_image_hotlink = 'i';
var $bypass_image_hotlink_page = false;
var $replace_headers = false;
var $remove_div = true;
var $order_by_date = true;
var $strip_ads = false;
var $strip_htmltags = 'blink,body,doctype,embed,font,form,frame,frameset,html,iframe,input,marquee,meta,noscript,object,param,script,style';
var $strip_attributes = 'class,id,style,onclick,onmouseover,onmouseout,onfocus,onblur';
var $encode_instead_of_strip = false;
// RSS Auto-Discovery Variables
var $parsed_url;
var $local = array();
var $elsewhere = array();
// XML Parsing Variables
var $xml;
var $tagName;
var $insideItem;
var $insideChannel;
var $insideImage;
var $insideAuthor;
var $itemNumber = 0;
var $authorNumber = 0;
var $categoryNumber = 0;
var $enclosureNumber = 0;
var $linkNumber = 0;
var $itemLinkNumber = 0;
var $data = false;
var $attribs;
var $xmldata;
var $feed_xmlbase;
var $item_xmlbase;
var $xhtml_prefix;
/****************************************************
CONSTRUCTOR
Initiates a couple of variables. Accepts feed_url, cache_location,
and cache_max_minutes.
****************************************************/
function SimplePie($feed_url = null, $cache_location = null, $cache_max_minutes = null) {
$this->useragent = $this->name . '/' . $this->version . ' (Feed Parser; ' . $this->url . '; Allow like Gecko) Build/' . $this->build;
$this->linkback = '<a href="' . $this->url . '" title="' . $this->name . ' ' . $this->version . '">' . $this->name . '</a>';
if (!is_null($feed_url)) {
$this->feed_url($feed_url);
}
if (!is_null($cache_location)) {
$this->cache_location($cache_location);
}
if (!is_null($cache_max_minutes)) {
$this->cache_max_minutes($cache_max_minutes);
}
if (!is_null($feed_url)) {
return $this->init();
}
// If we've passed an xmldump variable in the URL, snap into XMLdump mode
if (isset($_GET['xmldump'])) {
$this->enable_xmldump($_GET['xmldump']);
}
}
/****************************************************
CONFIGURE OPTIONS
Set various options (feed URL, XML dump, caching, etc.)
****************************************************/
// Feed URL
function feed_url($url) {
$url = $this->fix_protocol($url, 1);
$this->rss_url = $url;
return true;
}
// XML Dump
function enable_xmldump($enable) {
$this->xml_dump = (bool) $enable;
return true;
}
// Bypass Image Hotlink
function bypass_image_hotlink($getvar='i') {
$this->bypass_image_hotlink = (string) $getvar;
return true;
}
// Bypass Image Hotlink Page
function bypass_image_hotlink_page($page = false) {
$this->bypass_image_hotlink_page = (string) $page;
return true;
}
// Caching
function enable_caching($enable) {
$this->caching = (bool) $enable;
return true;
}
// Cache Timeout
function cache_max_minutes($minutes) {
$this->max_minutes = (int) $minutes;
return true;
}
// Cache Location
function cache_location($location) {
$this->cache_location = (string) $location;
return true;
}
// Replace H1, H2, and H3 tags with the less important H4 tags.
function replace_headers($enable) {
$this->replace_headers = (bool) $enable;
return true;
}
// Remove outer div in XHTML content within Atom
function remove_div($enable) {
$this->remove_div = (bool) $enable;
return true;
}
// Order the items by date
function order_by_date($enable) {
$this->order_by_date = (bool) $enable;
return true;
}
// Strip out certain well-known ads
function strip_ads($enable) {
$this->strip_ads = (bool) $enable;
return true;
}
// Strip out potentially dangerous tags
function strip_htmltags($tags, $encode=false) {
$this->strip_htmltags = (string) $tags;
$this->encode_instead_of_strip = (bool) $encode;
return true;
}
// Encode dangerous tags instead of stripping them
function encode_instead_of_strip($encode=true) {
$this->encode_instead_of_strip = (bool) $encode;
return true;
}
// Strip out potentially dangerous attributes
function strip_attributes($attrib) {
$this->strip_attributes = (string) $attrib;
return true;
}
/****************************************************
MAIN INITIALIZATION FUNCTION
Rewrites the feed so that it actually resembles XML, processes the XML,
and builds an array from the feed.
****************************************************/
function init() {
// If Bypass Image Hotlink is enabled, send image to the page and quit.
if ($this->bypass_image_hotlink) {
if (isset($_GET[$this->bypass_image_hotlink]) && !empty($_GET[$this->bypass_image_hotlink])) {
$this->display_image($_GET[$this->bypass_image_hotlink]);
exit;
}
}
// If Bypass Image Hotlink is enabled, send image to the page and quit.
if (isset($_GET['js'])) {
// JavaScript for the Odeo Player
$embed='';
$embed.='function embed_odeo(link) {';
$embed.='document.writeln(\'';
$embed.='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ';
$embed.=' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" ';
$embed.=' width="440" ';
$embed.=' height="80" ';
$embed.=' align="middle">';
$embed.='<param name="movie" value="http://odeo.com/flash/audio_player_fullsize.swf" />';
$embed.='<param name="allowScriptAccess" value="any" />';
$embed.='<param name="quality" value="high">';
$embed.='<param name="wmode" value="transparent">';
$embed.='<param name="flashvars" value="valid_sample_rate=true&external_url=\'+link+\'" />';
$embed.='<embed src="http://odeo.com/flash/audio_player_fullsize.swf" ';
$embed.=' pluginspage="http://www.macromedia.com/go/getflashplayer" ';
$embed.=' type="application/x-shockwave-flash" ';
$embed.=' quality="high" ';
$embed.=' width="440" ';
$embed.=' height="80" ';
$embed.=' wmode="transparent" ';
$embed.=' allowScriptAccess="any" ';
$embed.=' flashvars="valid_sample_rate=true&external_url=\'+link+\'">';
$embed.='</embed>';
$embed.='</object>';
$embed.='\');';
$embed.='}';
$embed.="\r\n";
$embed.='function embed_quicktime(type, bgcolor, width, height, link, placeholder, loop) {';
$embed.='document.writeln(\'';
$embed.='<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" ';
$embed.=' style="cursor:hand; cursor:pointer;" ';
$embed.=' type="\'+type+\'" ';
$embed.=' codebase="http://www.apple.com/qtactivex/qtplugin.cab" ';
$embed.=' bgcolor="\'+bgcolor+\'" ';
$embed.=' width="\'+width+\'" ';
$embed.=' height="\'+height+\'">';
$embed.='<param name="href" value="\'+link+\'" />';
$embed.='<param name="src" value="\'+placeho
没有合适的资源?快使用搜索试试~ 我知道了~
PHP实例开发源码—云计算导航源码.zip
共2303个文件
gif:1251个
php:470个
htm:322个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 138 浏览量
2022-11-24
02:15:35
上传
评论
收藏 8.48MB ZIP 举报
温馨提示
PHP实例开发源码—云计算导航源码.zip
资源推荐
资源详情
资源评论
收起资源包目录
PHP实例开发源码—云计算导航源码.zip (2303个子文件)
#host.asp 136KB
index.php.bak 5KB
style.css 64KB
pcndefault.css 50KB
style.css 43KB
style.css 43KB
ie6default.css 42KB
Public.css 19KB
Public.css 19KB
ie6.css 15KB
public.css 14KB
xwb_admin.css 11KB
n_share.css 10KB
admincp.css 10KB
shareout.css 9KB
style.css 9KB
xwb_1.5.css 8KB
xwb_2.css 8KB
xwb_base.css 5KB
style.css 4KB
style.css 4KB
style.css 4KB
style.css 4KB
style.css 4KB
style.css 3KB
HelpNew.css 2KB
HelpNew.css 2KB
style.css 2KB
style.css 2KB
style.css 2KB
style.css 2KB
style.css 2KB
about.css 2KB
discoverability.css 2KB
discoverability.css 2KB
style.css 1KB
style.css 1KB
style.css 1KB
style.css 1KB
rss.css 1KB
style.css 1KB
main.css 1KB
style.css 1KB
style.css 1KB
style.css 709B
xwb_admin_forum_index.css 696B
13980.popup.css 537B
widget.css 0B
img.gif 175KB
header.gif 52KB
body_bg.gif 42KB
box_background_main_4_2baidu.gif 27KB
doing.gif 24KB
bg_deco_b.gif 24KB
mtag1.gif 23KB
space.gif 23KB
header.gif 20KB
top2_bg.gif 19KB
bg_deco_m.gif 18KB
album.gif 15KB
bg_deco_m2.gif 15KB
link_cnfstar.gif 15KB
cp2.gif 14KB
submenu_site_indicator.gif 14KB
cp.gif 13KB
285.gif 12KB
78.gif 12KB
bg_deco_s.gif 11KB
title.gif 10KB
title.gif 10KB
mtag2.gif 10KB
84.gif 10KB
header.gif 10KB
bg_repno.gif 9KB
body_bg.gif 9KB
home.gif 8KB
box_background_main_4_2zwsw.gif 8KB
noavatar_big.gif 8KB
114.gif 8KB
244.gif 8KB
171.gif 8KB
101.gif 8KB
304.gif 8KB
15.gif 8KB
body_bg.gif 7KB
135.gif 7KB
48.gif 7KB
192.gif 7KB
310.gif 7KB
65.gif 7KB
288.gif 7KB
blog.gif 6KB
210.gif 6KB
328.gif 6KB
183.gif 6KB
69.gif 6KB
39.gif 6KB
268.gif 6KB
126.gif 6KB
245.gif 6KB
共 2303 条
- 1
- 2
- 3
- 4
- 5
- 6
- 24
资源评论
毕业_设计
- 粉丝: 1936
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功