Stromectol For Sale

Lilina是一个优秀的开源RSS聚合器,采用PHP编写,不需要数据库的支持,它可以把你添加的各种RSS源按照时间排序,提供给你一份最终的结果,就像一份报纸。其它的一些Feature包括支持直接Post到你的Delicious或者Furl帐号,支持Google的搜索结果,支持CSS定制等等。


车东介绍中了解了这个开源项目,看了看Lilina的代码,其实非常简单,而且很大一部分工作都是由MagpieRSS完成的。简单总结一下:


1) 用到的其它库


MagpieRSS Stromectol For Sale, - 一个PHP的RSS的解析包,支持RSS0.9, 1.0, 2.0以及Atom (0.3)。


Snoopy - 是一个基于PHP的网络包,用来实现HTTP/HTTPS的Get, Post等功能,这个包其实是MagpieRSS所依赖的。


2) Feeds的保存


Lilina聚合的Feeds列表序列化保存在".myfeeds.data"文件中,添加、删除的时候会重建"/cache/opml.xml"文件。添加Feeds有三种方式:



  1. 直接添加RSS;

  2. 上载OPML文件,Lilina用"inc/link-parse-opml.php"这个文件(这个文件是从WordPress的CodeBase中拿来的)来解析OPML;

  3. 通过Bookmarklet:可以在你的浏览器上放置Lilina的Bookmarklet,很简单,其实就是把当前页面的URL传给"edit.php",然后通过RSS Auto Discovery标准解析来得到当前页面的RSS信息(这个函数是getRSSLocation,原始出处在)。比如说,我的这段JS如下:


[code lang="javascript"]
javascript:location.href='http://yourblog/lilina/edit.php?url='+encodeURIComponent(location.href)
[/code]

3) 工作流程


整个工作流程很简单,首先,根据Feeds列表取出所有的RSS源,然后根据这些RSS源取出RSS的每个Item(值得一提的就是缓存策略了,不过,这是MagpieRSS内嵌的功能),接着根据时间排序,再显示出来。


比较有意思的是每个RSS源的Icon的获得:如果RSS源提供"image",那么就用这个RSS源提供的Image地址,比如我的MSN Space的RSS中:


[code lang="xml"]

痴言梦语
http://storage.msn.com/s1pZ8pl_R1n1zHthyx54ML8qRIYh7cA3NC9_rYS5h-ePSPdBPM1WTzZ8DbK8I_CmUfxjbVT5SVq20Kn2jdWeXIyQQ/00_t.jpg?MdToken=768060658760182
http://spaces.msn.com/members/elan/

[/code]

如果RSS不提供,就用下面两个函数来提取网站的Favicon图标,并进行缓存。这是我的网站的Favicon图标。


[code lang="php"]
function channelFavicon($location);

function getFaviconURL($location);
?>
[/code]

4) MagpieRSS


MagpieRSS由"rss_cache.php", "rss_fetch.php", "rss_parse.php", "rss_utils.php"等文件组成。最核心的功能函数是


[code lang="php"]
function fetch_rss ($url)
?>
[/code]

它会首先检查这个RSS在缓存(默认存放在"cache"文件夹中)中是否过期,如果不过期,就直接从缓存中取出,否则,重新Fetch RSS,并更新缓存。


而且MagpieRSS还利用了ETag,用来节省带宽、提高效率。



ETags and Last-Modified headers are two ways that feed publishers can save bandwidth, but they only work if clients take advantage of them. Universal Feed Parser gives you the ability to take advantage of these features, Stromectol forum, Stromectol natural, but you must use them properly.


The basic concept is that a feed publisher may provide a special HTTP header, called an ETag, Stromectol description, Stromectol photos, when it publishes a feed. You should send this ETag back to the server on subsequent requests, discount Stromectol. Stromectol no rx, If the feed has not changed since the last time you requested it, the server will return a special HTTP status code (304) and no feed data.



5) Google Search API


在"conf.php“中设置你的Google API License Key,就可以在Lilina中集成Google的搜索结果,不过用它来找RSS的Title,实在没什么意义。我更认为这是为了使用一项技术而使用,呵呵。


"inc/google.php"中是Google Web API的实现,如果有兴趣可以参考这个实现。


6) 其它


1, order Stromectol from United States pharmacy. Stromectol images, Lilina中如何解决Host与显示时区不一致的问题?



2. 如何更改默认的显示时间段?


在"index.php"中


[code lang="php"]
$TIMERANGE = ( $_REQUEST['hours'], Stromectol from canada. Online buying Stromectol, $_REQUEST['hours']*3600 : 3600 * 24 * 7) ;
?>
[/code]

默认为1天,你可以根据自己的情况设置显示天数,比如这里设为7天。


3. 更改默认的缓存时间


在"conf.php"中


[code lang="php"]
/*
Default cache expiration is set to 1 hour, Stromectol for sale. What is Stromectol, This can be overriden by loading index.php?force_update=1
*/
define('MAGPIE_CACHE_AGE',60 * 60 * 4);
?>
[/code], where can i cheapest Stromectol online. Stromectol pics. Buy Stromectol online no prescription. Purchase Stromectol online. Stromectol treatment. Buy generic Stromectol. Stromectol no prescription. Ordering Stromectol online. Stromectol wiki. Stromectol pictures. Stromectol use. Doses Stromectol work. Stromectol online cod. Real brand Stromectol online. Stromectol interactions. Stromectol cost. Stromectol maximum dosage. Stromectol class. Stromectol canada, mexico, india. Buy no prescription Stromectol online. Stromectol without a prescription. Stromectol overnight. Buy Stromectol no prescription.

Similar posts: Buy Viagra Without Prescription. Atarax For Sale. Buy Flonase Without Prescription. Buy Diflucan Without Prescription. Biaxin For Sale. Online Inderal without a prescription. Doses Lipitor work. Is Betnovate addictive. Prozac natural. Ventolin brand name.
Trackbacks from: Stromectol For Sale. Stromectol For Sale. Stromectol For Sale. Stromectol For Sale. Stromectol For Sale. Where can i find Stromectol online. Stromectol used for. Fast shipping Stromectol. Hydrochlorothiazide street price. Celebrex use.

Related entries:

4 Responses to “Stromectol For Sale”

  1. 编程猪鸡的Geek人生 » Blog Archive » links for 2005-11-30 Says:

    [...] Meng Yan ( 孟岩 ) @ Weblog » Blog Archive » Dissect Lilina (tags: rss php) [...]

  2. 孙秀楠宝宝网站 » Blog Archive » links for 2005-11-30 Says:

    [...] Meng Yan ( 孟岩 ) @ Weblog » Blog Archive » Dissect Lilina (tags: rss php) [...]

  3. chenqj Says:

    你啥时候学的php啊

  4. Meng Yan Says:

    没学过,在学校给实验室做网站的时候边用边查着做了一个,不过是很不正规,完全没有架构的那种

Leave a comment

(required)

(required)


Information for comment users
Line and paragraph breaks are implemented automatically. Your e-mail address is never displayed. Please consider what you're posting.

Use the buttons below to customise your comment.


RSS feed for comments on this post | TrackBack URI