<?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; WordPress</title>
	<atom:link href="http://shit.name/tag/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://shit.name</link>
	<description>此人之水镜，见之莹然，若披云雾而睹青天也。</description>
	<lastBuildDate>Wed, 31 Dec 2014 06:21:04 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.0.33</generator>
	<item>
		<title>纯代码完美实现WordPress内容回复可见</title>
		<link>http://shit.name/pure-code-of-reply-to-read/</link>
		<comments>http://shit.name/pure-code-of-reply-to-read/#comments</comments>
		<pubDate>Thu, 24 Oct 2013 09:56:40 +0000</pubDate>
		<dc:creator><![CDATA[Oo雨天阳光oO]]></dc:creator>
				<category><![CDATA[互联二亩田]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[回复可见]]></category>
		<category><![CDATA[纯代码]]></category>

		<guid isPermaLink="false">http://shit.name/?p=289</guid>
		<description><![CDATA[前两天找到了旧博的备份数据，想着把旧文整理上来也好丰富下久不更新的博客。 整理的第一篇是智商、财商的测试类文章 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>前两天找到了旧博的备份数据，想着把旧文整理上来也好丰富下久不更新的博客。</p>
<p>整理的第一篇是智商、财商的测试类文章——<a title="【转】智商财商大测试" href="http://shit.name/iq-fq-big-test/" target="_blank">《【转】智商财商大测试》</a>，前面是题目，后面是答案。一般网页上这类的都会做分页处理，答案会放在题目的下一页，但是在一篇博文中去做分页或是另开一篇博文公布答案感觉都不合适。所以要是能像论坛那样可设置回复可见，不仅能增强与博友的互动，还能提高博客的访问量，多棒！<br />
<span id="more-289"></span><br />
网上找了一圈，有用各种各样插件达成的，其中提到最多的是“<a title="Easy2Hide" href="http://wordpress.org/plugins/easy2hide/" target="_blank">Easy2Hide</a>”，虽然它代码也蛮短的，但是“插件”二字总让我嫌弃，还是找纯代码的才能抚慰我轻微的强迫症。</p>
<p>搜索不负强迫人，总算找到一段完美的代码可以实现这个功能，具体样式请见已用该效果的博文——<a title="【转】智商财商大测试" href="http://shit.name/iq-fq-big-test/" target="_blank">《【转】智商财商大测试》</a>，我在这里介绍该代码分别对于一般主题和Mossight主题的添加方法。</p>
<p>对于一般主题，只要把这段代码添加到function.php中即可，详细代码如下：</p>
<pre class="brush: php; title: ; notranslate">
function reply_to_read($atts, $content=null) {
extract(shortcode_atts(array(&quot;notice&quot; =&gt; '

温馨提示: 此处内容需要评论本文后才能查看

'), $atts));
$email = null;
$user_ID = (int) wp_get_current_user()-&gt;ID;
if ($user_ID &gt; 0) {
$email = get_userdata($user_ID)-&gt;user_email; //对博主直接显示内容
$admin_email = &quot;on@sunny.lu&quot;; //博主Email
if ($email == $admin_email) {
return $content;
}
} else if (isset($_COOKIE['comment_author_email_' . COOKIEHASH])) {
$email = str_replace('%40', '@', $_COOKIE['comment_author_email_' . COOKIEHASH]);
} else {
return $notice;
}
if (empty($email)) {
return $notice;
}
global $wpdb;
$post_id = get_the_ID();
$query = &quot;SELECT `comment_ID` FROM {$wpdb-&gt;comments} WHERE `comment_post_ID`={$post_id} and `comment_approved`='1' and `comment_author_email`='{$email}' LIMIT 1&quot;;
if ($wpdb-&gt;get_results($query)) {
return do_shortcode($content);
} else {
return $notice;
}
}
add_shortcode('reply', 'reply_to_read');
</pre>
<div class='newcode'><h2>Mossight主题</h2><div class='newcontent'><br />
Mossight主题本身就自带丰富的短代码，我们无需修改function.php，只要把这个“回复可见”添加进短代码库，在使用后台编辑器写文章时就可以很方便地调用了。（话说Mossight主题里有个下拉菜单的短代码可以暂时把想隐藏的内容藏起来，但是既点既现让懒博友又方便了，所以还是回复可见比较好）。</p>
<p>短代码库：wp-content\themes\Mossight\functions\shortcode.php<br />
找到代码</p>
<pre class="brush: php; title: ; notranslate">add_shortcode('toggle','post_toggle');</pre>
<p>另起一行插入代码：</p>
<pre class="brush: php; title: ; notranslate">
//shortcode - self
//reply_to_read
function reply_to_read($atts, $content=null) { 
extract(shortcode_atts(array(&quot;notice&quot; =&gt; '
&lt;blockquote&gt;
&lt;p style=&quot;color: #993300;&quot;&gt;&lt;strong&gt;温馨提示:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;此处内容需要评论本文后才能查看&lt;/p&gt; 
&lt;/blockquote&gt;
'), $atts)); 
$email = null; 
$user_ID = (int) wp_get_current_user()-&gt;ID; 
if ($user_ID &gt; 0) { 
$email = get_userdata($user_ID)-&gt;user_email; //对博主直接显示内容 
$admin_email = &quot;on@sunny.lu&quot;; //博主Email 
if ($email == $admin_email) { 
return $content; 
} 
} else if (isset($_COOKIE['comment_author_email_' . COOKIEHASH])) { 
$email = str_replace('%40', '@', $_COOKIE['comment_author_email_' . COOKIEHASH]); 
} else { 
return $notice; 
} 
if (empty($email)) { 
return $notice; 
} 
global $wpdb; 
$post_id = get_the_ID(); 
$query = &quot;SELECT `comment_ID` FROM {$wpdb-&gt;comments} WHERE `comment_post_ID`={$post_id} and `comment_approved`='1' and `comment_author_email`='{$email}' LIMIT 1&quot;; 
if ($wpdb-&gt;get_results($query)) { 
return do_shortcode($content); 
} else { 
return $notice; 
} 
} 
add_shortcode('reply', 'reply_to_read');
</pre>
<p>然后再找到最后一个QTags.addButton项</p>
<pre class="brush: php; title: ; notranslate">QTags.addButton( 'm31', '下载按钮', '【butdown href=&quot;链接&quot;】标题【/butdown】');//这用【 】防止代码运行，使用时请用[ ]替换</pre>
<p>在其后面新增一项：</p>
<pre class="brush: php; title: ; notranslate">QTags.addButton( 'm32', '回复可见', '【reply】这里输入内容【/reply】');//这用【 】防止代码运行，使用时请用[ ]替换</pre>
<p>就可以了。<br />
</div></div>
<blockquote><p>这段代码的显示样式是可以设定的，只要用Html标签和样式把“温馨提示: 此处内容需要评论本文后才能查看”美化即可,比如在Mossight主题里的，我使用了blockquote标签、p标签和css，博友们可以根据自己的需求更改。</p>
<p><span style="color: #993300;"><strong>使用方法：</strong></span><br />
一般主题：在后台编辑文章时使用“【reply】【/reply】”把要隐藏的内容包起来即可（这用【 】防止代码运行，使用时请用[ ]替换）<br />
Mossight主题：修改好shortcode.php后，进后台编辑器直接点“回复可见”按钮插入</p>
<p><strong>“回复可见”这个功能虽有优点，但也是有缺点的</strong><br />
<span style="color: #993300;"><strong>优点：</strong></span>增强与博友的互动，提高博客的访问量<br />
<span style="color: #993300;"><strong>缺点：</strong></span>回复可见不是实时的，内容要等评论审核通过后才可见</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://shit.name/pure-code-of-reply-to-read/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>利用WP原生函数纯代码实现WordPress归档页面模板</title>
		<link>http://shit.name/pure-code-of-archives/</link>
		<comments>http://shit.name/pure-code-of-archives/#comments</comments>
		<pubDate>Wed, 15 Aug 2012 10:24:26 +0000</pubDate>
		<dc:creator><![CDATA[Oo雨天阳光oO]]></dc:creator>
				<category><![CDATA[互联二亩田]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[原生函数]]></category>
		<category><![CDATA[归档]]></category>
		<category><![CDATA[纯代码]]></category>

		<guid isPermaLink="false">http://shit.name/?p=174</guid>
		<description><![CDATA[比起其他的收费主题，Mossight唯一的不足就是没有现成的归档页面，个人觉得归档页面对于一个博客来说还是比较 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><img src="http://shit.name/wp-content/uploads/2012/08/archives.jpg" alt="" title="archives" width="614" height="140" class="alignnone size-full wp-image-175" /><br />
比起其他的收费主题，<a title="Mossight收费主题" href="http://mossight.jezzzz.me/" target="_blank">Mossight</a>唯一的不足就是没有现成的归档页面，个人觉得归档页面对于一个博客来说还是比较重要，所以自己动手，丰衣足食。</p>
<p>对于这个问题最简单的办法就是弄个归档页面的插件。不过插件让WordPress越发臃肿，所以秉着简洁高效的原则，我还是想通过代码来实现这个功能，通过"谷哥"和"度娘"，半个码农的我也是能解决这个问题的。</p>
<p>网上看下来，关于用代码写归档页大致有两种，一是直接使用 SQL 语句实现调用，另外一种是使用WordPress 推荐的 WP_Query() 函数来调用。WordPress 官方不提倡直接使用 SQL 语句实现，所以我会参照后面一种方法进行。</p>
<p>下面方法每个步骤都分两种，一种是对于一般主题，另外一种是针对<a title="Mossight收费主题" href="http://mossight.jezzzz.me/">Mossight</a>主题的。如各位看客需了解其原理，请移步<strong>原创作者：</strong><a title="WordPress归档页面" href="http://zww.me/archives/25589" target="_blank">ZWWoOoOo</a>（毕竟借鉴他人的没有那么足底气跟人讲解 呵呵）查看具体效果：请看<a title="归档" href="http://shit.name/archives" target="_blank">我博客的存档页</a><span id="more-174"></span></p>
<p>1、原教程说把下面的函数扔到所用主题的 functions.php 文件（ 为了避免中文乱码，将其转化为UTF8 无 BOM 格式）里面：</p>
<pre class="brush: php; title: ; notranslate">/* Archives list by zwwooooo | http://zww.me */
 function zww_archives_list() {
     if( !$output = get_option('zww_archives_list') ){
         $output = '&lt;div id=&quot;archives&quot;&gt;&lt;p&gt;[&lt;a id=&quot;al_expand_collapse&quot; href=&quot;#&quot;&gt;全部展开/收缩&lt;/a&gt;] &lt;em&gt;(注: 点击月份可以展开)&lt;/em&gt;&lt;/p&gt;';
         $the_query = new WP_Query( 'posts_per_page=-1&amp;ignore_sticky_posts=1' ); //update: 加上忽略置顶文章
         $year=0; $mon=0; $i=0; $j=0;
         while ( $the_query-&gt;have_posts() ) : $the_query-&gt;the_post();
             $year_tmp = get_the_time('Y');
             $mon_tmp = get_the_time('m');
             $y=$year; $m=$mon;
             if ($mon != $mon_tmp &amp;&amp; $mon &gt; 0) $output .= '&lt;/ul&gt;&lt;/li&gt;';
             if ($year != $year_tmp &amp;&amp; $year &gt; 0) $output .= '&lt;/ul&gt;';
             if ($year != $year_tmp) {
                 $year = $year_tmp;
                 $output .= '&lt;h3 class=&quot;al_year&quot;&gt;'. $year .' 年&lt;/h3&gt;&lt;ul class=&quot;al_mon_list&quot;&gt;'; //输出年份
             }
             if ($mon != $mon_tmp) {
                 $mon = $mon_tmp;
                 $output .= '&lt;li&gt;&lt;span class=&quot;al_mon&quot;&gt;'. $mon .' 月&lt;/span&gt;&lt;ul class=&quot;al_post_list&quot;&gt;'; //输出月份
             }
             $output .= '&lt;li&gt;'. get_the_time('d日: ') .'&lt;a href=&quot;'. get_permalink() .'&quot;&gt;'. get_the_title() .'&lt;/a&gt; &lt;em&gt;('. get_comments_number('0', '1', '%') .')&lt;/em&gt;&lt;/li&gt;'; //输出文章日期和标题
         endwhile;
         wp_reset_postdata();
         $output .= '&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;';
         update_option('zww_archives_list', $output);
     }
     echo $output;
 }
 function clear_zal_cache() {
     update_option('zww_archives_list', ''); // 清空 zww_archives_list
 }
 add_action('save_post', 'clear_zal_cache'); // 新发表文章/修改文章时</pre>
<div class='newcode'><h2>Mossight主题</h2><div class='newcontent'>本人启用了Mossight-child子主题，而且这个子主题里的functions.php 文件内容为空，所以直接将上面代码复制到functions.php 文件内即可</div></div>
<p>2. 复制一份主题的 page.php 更名为 archives.php，然后在最顶端加入：</p>
<pre class="brush: php; title: ; notranslate">&lt;?php
/* Template Name: archives */
?&gt;</pre>
<p>然后找到其中类似</p>
<pre class="brush: php; title: ; notranslate">&lt;?php content(); ?&gt;</pre>
<p>代码，在其下面加入如下代码：</p>
<pre class="brush: php; title: ; notranslate">&lt;!--archives--&gt;
&lt;?php zww_archives_list(); ?&gt;
&lt;!--archives end--&gt;</pre>
<p>然后进wp后台添加一新页面，在右侧栏模板选择 archives。<br />
<div class='newcode'><h2>Mossight主题</h2><div class='newcontent'>将Mossight文件夹里的page.php按照上面的方法更改即可。</div></div></p>
<p>3. 给主题加载 jQuery 库，没有加载的，把下面这句扔到 functions.php 里面就行了。</p>
<pre class="brush: php; title: ; notranslate">wp_enqueue_script('jquery');</pre>
<div class='newcode'><h2>Mossight主题</h2><div class='newcontent'>由于我已启用主题调用的新浪jquery库，所以这步省略。</div></div>
<p>4. jQuery 效果代码</p>
<pre class="brush: jscript; title: ; notranslate">jQuery(document).ready(function($){
 //===================================存档页面 jQ伸缩
     (function(){
         $('#al_expand_collapse,#archives span.al_mon').css({cursor:&quot;s-resize&quot;});
         $('#archives span.al_mon').each(function(){
             var num=$(this).next().children('li').size();
             var text=$(this).text();
             $(this).html(text+'&lt;em&gt; ( '+num+' 篇文章 )&lt;/em&gt;');
         });
         var $al_post_list=$('#archives ul.al_post_list'),
             $al_post_list_f=$('#archives ul.al_post_list:first');
         $al_post_list.hide(1,function(){
             $al_post_list_f.show();
         });
         $('#archives span.al_mon').click(function(){
             $(this).next().slideToggle(400);
             return false;
         });
         $('#al_expand_collapse').toggle(function(){
             $al_post_list.show();
         },function(){
             $al_post_list.hide();
         });
     })();
 });</pre>
<p>PS：不知道怎么写js文件调用的就直接打开 header.php 并找到
<pre class="brush: php; title: ; notranslate">&lt;?php wp_head(); ?&gt;</pre>
<p>在其下面加上</p>
<pre class="brush: jscript; title: ; notranslate">&lt;script type=&quot;text/javascript&quot;&gt;上面那段jQuery代码&lt;/script&gt;</pre>
<div class='newcode'><h2>Mossight主题</h2><div class='newcontent'>个人认为上面那段jQuery效果代码应该只作用于归档页面，如果贸然添加到header.php这全局文件可能会影响到别页面的其他jQuery效果，所以我将上面那段代码添加到之前创建的archives.php文件里，找到
<pre class="brush: php; title: ; notranslate">&lt;?php get_header()?&gt;</pre>
<p>并在下面添加</p>
<pre class="brush: jscript; title: ; notranslate">&lt;script type=&quot;text/javascript&quot;&gt;上面那段jQuery代码&lt;/script&gt;</pre>
<p>即可。</div></div>
<blockquote><p><span style="color: #993300;">到这步，归档页面的功能已经都实现了，如果对其原始的样式不满意，还可以根据下面给出的HTML结构进行美化。</span></p></blockquote>
<p>5.css根据需要写，不写也可以。HTML结构如下：
<pre class="brush: php; title: ; notranslate">&lt;div id=&quot;archives&quot;&gt;
     &lt;p&gt;[&lt;a id=&quot;al_expand_collapse&quot; href=&quot;#&quot;&gt;全部展开/收缩&lt;/a&gt;] &lt;em&gt;(注: 点击月份可以展开)&lt;/em&gt;&lt;/p&gt;
     &lt;h3 class=&quot;al_year&quot;&gt;'年份&lt;/h3&gt;
     &lt;ul class=&quot;al_mon_list&quot;&gt;
         &lt;li&gt;&lt;span class=&quot;al_mon&quot;&gt;月份&lt;em&gt; (本月文章数量)&lt;/em&gt;&lt;/span&gt;
             &lt;ul class=&quot;al_post_list&quot;&gt;
                 &lt;li&gt;号数: &lt;a href=&quot;文章链接&quot;&gt;文章标题&lt;/a&gt; &lt;em&gt;(评论数量)&lt;/em&gt;&lt;/li&gt;
             &lt;/ul&gt;
         &lt;/li&gt;
     &lt;/ul&gt;
 &lt;/div</pre>
<div class='newcode'><h2>Mossight主题</h2><div class='newcontent'>我这里只做了相关段落的缩进。<br />
同样在之前创建的archives.php文件里，找到
<pre class="brush: php; title: ; notranslate">&lt;?php get_header()?&gt;</pre>
<p>并在下面添加</p>
<pre class="brush: css; title: ; notranslate">&lt;style type=&quot;text/css&quot;&gt;
#archives .al_mon {
	margin-left:3em;
}
#archives .al_post_list {
	margin-left:5.6em;
}
&lt;/style&gt;</pre>
<p></div></div>
<p>OK 大功告成了！现在你的博客也有jQuery伸缩效果的归档页面了，而且还是纯代码、原生态的。</p>
<p>也许有对代码头晕，但又想用归档页面的Mossight童鞋，好吧，那我好人做到底，将上面两个文件打包，提供给大家下载。<br />
<span style="color: #993300;"><strong>archives.php文件</strong></span><br />
使用方法：将该文件上传至Mossight文件夹即可（需要修改归档页面样式的童鞋，请在里面进行修改，具体位置已标注）<br />
<span class="but-down"><a href="http://shit.name/wp-content/uploads/2012/archives/archives.rar" target="_blank"><span>archives.php打包文件</span></a></span><br />
<span style="color: #993300;"><strong>functions.php文件</strong></span><br />
使用方法：将该文件覆盖Mossight-child文件夹里的同名文件即可<br />
<span class="but-down"><a href="http://shit.name/wp-content/uploads/2012/archives/functions.rar" target="_blank"><span>functions.php打包文件</span></a></span></p>
<blockquote><p><span style="color: #993300;"><strong>对于再次升级的Mossight1.8.0版主题也同样适用</strong></span><br />
再次感谢一直为该主题更新的三位童鞋   <A title="虾子酱" href="http://jezzzz.me/" target="_blank">Jezzzz</A>   <A title="沐歌" href="http://mugee.info/" target="_blank">Mugee</A>   <A title="牧风" href="http://mufeng.me" target="_blank">牧风</A></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://shit.name/pure-code-of-archives/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>WordPress无法正确记录访客评论IP解决方法</title>
		<link>http://shit.name/solution-of-recording-ip/</link>
		<comments>http://shit.name/solution-of-recording-ip/#comments</comments>
		<pubDate>Sat, 11 Aug 2012 13:32:15 +0000</pubDate>
		<dc:creator><![CDATA[Oo雨天阳光oO]]></dc:creator>
				<category><![CDATA[互联二亩田]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[访客]]></category>
		<category><![CDATA[评论]]></category>

		<guid isPermaLink="false">http://shit.name/?p=156</guid>
		<description><![CDATA[这个博客架设在Xehost的达拉斯VPS上，不过细心的童鞋应该发觉访问速度比美国的VPS快很多，实际Ping值 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-157" title="message" src="http://shit.name/wp-content/uploads/2012/08/message.jpg" alt="" width="614" height="120" /><br />
这个博客架设在<a title="Xehost" href="http://shit.name/go/xehost/" target="_blank">Xehost</a>的达拉斯VPS上，不过细心的童鞋应该发觉访问速度比美国的VPS快很多，实际Ping值也在100以下。其实这都归功于CDN，目前在用<a title="incapsula" href="http://shit.name/go/incapsula/" target="_blank">incapsula</a>的免费款（每月50G流量对于一般BLOG都够用），而且幸运地被分配到了日本节点，所以访问速度比较不错。<br />
速度是上去了，不过随之而来的问题就是无法获得访客评论时的真正IP——显示的都是那个日本节点的IP地址。经过一番搜索后，找到很多方法，实际测试下来有两种方法是比较靠谱的。<span id="more-156"></span></p>
<div class='newcode'><h2>第一种方法：</h2><div class='newcontent'>在wp-config.php开头加入以下代码：（把wp-config.php中的代码全部看了遍，并无关于获取IP地址的其他代码，所以我加在了最后，实际效果和在开头一样）</p>
<pre class="brush: php; title: ; notranslate">/* 获取评论的真实IP */
if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])){
$list = explode(',',$_SERVER['HTTP_X_FORWARDED_FOR']);
$_SERVER['REMOTE_ADDR'] = $list[0];}</pre>
<p></div></div>
<div class='newcode'><h2>第二种方法：</h2><div class='newcontent'>打开wp-includes/comment.php，找到wp_new_comment函数，这个函数是将一个新评论入库。<br />
把其中
<pre class="brush: php; title: ; notranslate">$commentdata['comment_author_IP'] = preg_replace( '/[^0-9a-fA-F:., ]/', &quot;,$_SERVER['REMOTE_ADDR'] );</pre>
<p>修改为
<pre class="brush: php; title: ; notranslate">$commentdata['comment_author_IP'] = preg_replace( '/[^0-9a-fA-F:., ]/', &quot;,$_SERVER['HTTP_X_FORWARDED_FOR'] );</pre>
<p>另外将
<pre class="brush: php; title: ; notranslate">$_SERVER['REMOTE_ADDR']</pre>
<p>替换为
<pre class="brush: php; title: ; notranslate">$_SERVER[&quot;HTTP_X_FORWARDED_FOR&quot;]</pre>
<p>这样就OK了</div></div>
<blockquote><p>做下注解：<br />
$_SERVER['REMOTE_ADDR'] #正在浏览当前页面用户的 IP 地址。<br />
$_SERVER["HTTP_X_FORWARDED_FOR"] #透过代理服务器取得客户端的真实 IP 地址</p></blockquote>
<p>两种方法我测试下来，实际上是有区别的，主要在于系统因为评论给博主自动发的通知邮件，如图中红框所示：<br />
<img class="alignnone size-full wp-image-158" title="recording_ip_screenshot" src="http://shit.name/wp-content/uploads/2012/08/recording_ip_screenshot.jpg" alt="" width="560" height="616" /><br />
上面是用方法一被评论后收到的邮件——评论者IP和其主机名一致；下面是用方法二后得到的——评论者IP有两个而且其主机名没有获取到。</p>
<blockquote><p>从上得出的结论就是：<br />
<span style="color: #993300;"><strong>强烈建议使用第一种方法——简洁、方便、完美！</strong></span></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://shit.name/solution-of-recording-ip/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
