<?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>52微笑Blog &#187; 百度网盘</title>
	<atom:link href="https://www.52smile.cn/?feed=rss2&#038;tag=%E7%99%BE%E5%BA%A6%E7%BD%91%E7%9B%98" rel="self" type="application/rss+xml" />
	<link>https://www.52smile.cn</link>
	<description>记录生活点滴，分享精彩缤纷！</description>
	<lastBuildDate>Mon, 15 Jun 2015 13:33:12 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>第三期：php下载百度网盘文件</title>
		<link>https://www.52smile.cn/?p=1195</link>
		<comments>https://www.52smile.cn/?p=1195#comments</comments>
		<pubDate>Sat, 08 Jun 2013 01:48:18 +0000</pubDate>
		<dc:creator><![CDATA[子涛]]></dc:creator>
				<category><![CDATA[php代码汇]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[百度网盘]]></category>

		<guid isPermaLink="false">http://www.52smile.cn/?p=1195</guid>
		<description><![CDATA[<a href="https://www.52smile.cn/?p=1195"><img width="640" height="225" src="http://www.52smile.cn/wp-content/uploads/2013/06/everydaycode.jpg" class="attachment-post-thumbnail wp-post-image" alt="everydaycode" itemprop="image" lazyload="1" /></a>每日代码汇第三期：php下载百度网盘文件 12345678910111213141516171819&#60;?php $canshu=$_SERVER&#91;&#34;QUERY_STRING&#34;&#93;; if&#40;$canshu==&#34;&#34;&#41; &#160;&#123; &#038;n]]></description>
				<content:encoded><![CDATA[<a href="https://www.52smile.cn/?p=1195"><img width="640" height="225" src="http://www.52smile.cn/wp-content/uploads/2013/06/everydaycode.jpg" class="attachment-post-thumbnail wp-post-image" alt="everydaycode" itemprop="image" lazyload="1" /></a><p>每日代码汇第三期：php下载百度网盘文件</p>
<div class="codecolorer-container php blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #000088;">$canshu</span><span style="color: #339933;">=</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;QUERY_STRING&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$canshu</span><span style="color: #339933;">==</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><br />
&nbsp;<span style="color: #009900;">&#123;</span><br />
&nbsp;<span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;文件不存在&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp;<span style="color: #009900;">&#125;</span><br />
<span style="color: #b1b100;">else</span><br />
<span style="color: #009900;">&#123;</span><br />
<span style="color: #000088;">$wangzhi</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;http://pan.baidu.com/share/link?&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$canshu</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$file</span><span style="color: #339933;">=</span><span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wangzhi</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$pattern</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'/a&gt;&lt;a class=&quot;dbtn cancel singledbtn&quot; href=(.*?)id=&quot;downFileButtom&quot;&gt;/i'</span><span style="color: #339933;">;</span><br />
<span style="color: #990000;">preg_match_all</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$pattern</span><span style="color: #339933;">,</span><span style="color: #000088;">$file</span><span style="color: #339933;">,</span><span style="color: #000088;">$result</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <br />
<span style="color: #000088;">$tempurl</span><span style="color: #339933;">=</span><span style="color: #990000;">implode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$result</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$fileurlt</span><span style="color: #339933;">=</span><span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$tempurl</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$fileurl</span><span style="color: #339933;">=</span><span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&amp;amp;&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&amp;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$fileurlt</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;location:<span style="color: #006699; font-weight: bold;">$fileurl</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&lt;/a&gt;</div></td></tr></tbody></table></div>
<p>图例：</p>
<p><img src="http://static.oschina.net/uploads/code/201301/12174754_BgqS.jpg"/></p>
<p>来源：http://www.oschina.net/code/snippet_586126_17325(oschina.net)</p>
<p>生产：╭ァの修罗</p>
<p>主页：http://my.oschina.net/u/586126</p>
]]></content:encoded>
			<wfw:commentRss>https://www.52smile.cn/?feed=rss2&#038;p=1195</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
