<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>没有比人更高的山 &#187; 防盗链</title>
	<atom:link href="http://www.zhlwish.com/tag/%e9%98%b2%e7%9b%97%e9%93%be/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zhlwish.com</link>
	<description>Where there is a will there is a way.</description>
	<lastBuildDate>Fri, 13 Jan 2012 08:13:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>网站实现文件下载防盗链以及防爬虫</title>
		<link>http://www.zhlwish.com/2009/11/15/anti-leech/</link>
		<comments>http://www.zhlwish.com/2009/11/15/anti-leech/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 00:44:00 +0000</pubDate>
		<dc:creator>周亮</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[防盗链]]></category>

		<guid isPermaLink="false">http://www.zhlwish.com/?p=21</guid>
		<description><![CDATA[在google华莽用户组看到关于这个话题的文章，中间提到一种办法很简单实用，而且和Web服务器完全解耦，在任何平台下都可以通用，记录如下： 首先，在数据库中保存真实地址的hash值，在网页上只显示hash值，提交后根据hash再找到真实地址，返回重定向反馈。这一步实现了URL的隐藏，但是对于有些下载工具（如迅雷），可以找出hash地址和重定向地址。 然后，将网页显示url增加一个参数，编程http://www.aa.com/down/hashkey.mp3?key=123，其中key的值是MD5加密当前日期或者是时间（不能太过于精确了，不然一个网页打开几分钟链接就失效了）的值，提交到服务器之后，Web应用程序再对服务器日期或者时间进行MD5加密，然后对比，如果发现不一致，那么肯定是有人（或者爬虫）把你的链接盗用过去了。 这样即使是下载工具找到了你的重定向地址也失效了，就防止了盗链和爬虫了。]]></description>
		<wfw:commentRss>http://www.zhlwish.com/2009/11/15/anti-leech/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.aa.com/down/hashkey.mp3?key=123" length="0" type="audio/mpeg" />
		</item>
	</channel>
</rss>

