<?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; file_get_contents</title>
	<atom:link href="http://www.iron-feet.com/tag/file_get_contents/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.iron-feet.com</link>
	<description>笑骂由人，洒脱自如！心若冰清，天塌不惊！</description>
	<lastBuildDate>Sun, 04 Dec 2011 15:05:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>One Method to Bypass The Bug #11058 of PHP</title>
		<link>http://www.iron-feet.com/it/one-method-to-bypass-the-bug-11058-of-php/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=one-method-to-bypass-the-bug-11058-of-php</link>
		<comments>http://www.iron-feet.com/it/one-method-to-bypass-the-bug-11058-of-php/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 13:21:03 +0000</pubDate>
		<dc:creator>Iron_Feet</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[file_get_contents]]></category>
		<category><![CDATA[getaddrinfo failed]]></category>
		<category><![CDATA[libcurl]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[php_network_getaddresses]]></category>

		<guid isPermaLink="false">http://www.iron-feet.cn/?p=2644</guid>
		<description><![CDATA[最近接触PHP很多，由于PHP也就接触了才一年，因此遇到了不少问题，其中当时让我比较头疼是一个因为PHP自身的Bug而引起的麻烦。

开始我是想抓取一个页面的源代码：

 

很简单的代码，当时觉得肯定不会有问题的，但是在我的本机上（环境是IAMP）一运行，报错：


php_ne[......]<p class='read-more'><a href='http://www.iron-feet.com/it/one-method-to-bypass-the-bug-11058-of-php/'>Read more</a></p>]]></description>
			<content:encoded><![CDATA[<script type="text/javascript" src="http://china-addthis.googlecode.com/svn/trunk/addthis.js" charset="utf-8"></script><span class='addthis_org_cn'><a u='http://www.iron-feet.com/it/one-method-to-bypass-the-bug-11058-of-php/' t='One Method to Bypass The Bug #11058 of PHP' d='' tag='file_get_contents,getaddrinfo failed,libcurl,PHP,php_network_getaddresses' href='http://addthis.org.cn/share/' title='收藏-分享'><img src='http://www.iron-feet.com/wp-content/plugins/addthischina/a3.gif' alt='分享家:Addthis中国' align='absmiddle' /></a></span>
<p>最近接触PHP很多，由于PHP也就接触了才一年，因此遇到了不少问题，其中当时让我比较头疼是一个因为PHP自身的Bug而引起的麻烦。</p>
<p>开始我是想抓取一个页面的源代码：</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://www.iron-feet.cn/&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$content</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>很简单的代码，当时觉得肯定不会有问题的，但是在我[......]
<p class='read-more'><a href='http://www.iron-feet.com/it/one-method-to-bypass-the-bug-11058-of-php/'>Read more</a></p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li>October 4, 2010 -- <a href="http://www.iron-feet.com/it/wordpress-plugin-imgcache/" title="Wordpress Plugin: ImgCache">Wordpress Plugin: ImgCache</a> (15)</li><li>August 14, 2009 -- <a href="http://www.iron-feet.com/it/the-free-lunch-is-not-delicious-http-header-restriction/" title="The Free Lunch is Not Delicious-HTTP Header Restriction">The Free Lunch is Not Delicious-HTTP Header Restriction</a> (3)</li><li>July 26, 2009 -- <a href="http://www.iron-feet.com/it/wordpress-plugincustom-url-shorter/" title="Wordpress Plugin: Custom URL Shorter">Wordpress Plugin: Custom URL Shorter</a> (18)</li><li>April 3, 2009 -- <a href="http://www.iron-feet.com/it/dns-redirection-using-php/" title="DNS Redirection Using PHP">DNS Redirection Using PHP</a> (2)</li><li>December 30, 2008 -- <a href="http://www.iron-feet.com/it/one-bug-of-dedecms/" title="One Bug of DEDECMS">One Bug of DEDECMS</a> (0)</li><li>August 18, 2008 -- <a href="http://www.iron-feet.com/it/sth-about-dedecms/" title="Sth. About DeDeCMS">Sth. About DeDeCMS</a> (2)</li><li>July 8, 2008 -- <a href="http://www.iron-feet.com/it/ready-for-php/" title="Ready For PHP">Ready For PHP</a> (0)</li></ul><hr />
<p><small>© Iron_Feet for <a href="http://www.iron-feet.com">风云阁</a>, 2009. |
<a href="http://www.iron-feet.com/it/one-method-to-bypass-the-bug-11058-of-php/">Permalink</a> |
<a href="http://www.iron-feet.com/it/one-method-to-bypass-the-bug-11058-of-php/#comments">2 comments</a> |
Add to
<a href="http://del.icio.us/post?url=http://www.iron-feet.com/it/one-method-to-bypass-the-bug-11058-of-php/&title=One Method to Bypass The Bug #11058 of PHP">del.icio.us</a>
<br/>
Post tags: <a href="http://www.iron-feet.com/tag/file_get_contents/" rel="tag">file_get_contents</a>, <a href="http://www.iron-feet.com/tag/getaddrinfo-failed/" rel="tag">getaddrinfo failed</a>, <a href="http://www.iron-feet.com/tag/libcurl/" rel="tag">libcurl</a>, <a href="http://www.iron-feet.com/tag/php/" rel="tag">PHP</a>, <a href="http://www.iron-feet.com/tag/php_network_getaddresses/" rel="tag">php_network_getaddresses</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://www.iron-feet.com/it/one-method-to-bypass-the-bug-11058-of-php/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
