<?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; search</title>
	<atom:link href="http://www.rainmoe.com/tag/search/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rainmoe.com</link>
	<description>One code, one world ...</description>
	<lastBuildDate>Thu, 29 Dec 2011 14:04:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>防搜索转向代码与收录查询程序编写手记</title>
		<link>http://www.rainmoe.com/2010/08/19/redirect-function-with-unfriendly-search-engine-code-and-siteinfo-program/</link>
		<comments>http://www.rainmoe.com/2010/08/19/redirect-function-with-unfriendly-search-engine-code-and-siteinfo-program/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 05:46:20 +0000</pubDate>
		<dc:creator>小邪</dc:creator>
				<category><![CDATA[作品 [Work]]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[redirect]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://www.evlos.org/?p=2013</guid>
		<description><![CDATA[> 嘿嘿，最近 FORECE 有问小邪关于如何防搜索引擎跟踪重定向的方法，小邪把自己用的代码送给大家。

> 另外，小邪完成了个网站收录查询程序，因为是网友跟小邪买的，所以只写心得，代码不能公开鸟。



<span class="readmore"><a href="http://www.rainmoe.com/2010/08/19/redirect-function-with-unfriendly-search-engine-code-and-siteinfo-program/" title="防搜索转向代码与收录查询程序编写手记">阅读全文——共1419字</a></span>]]></description>
			<content:encoded><![CDATA[<p>> 嘿嘿，最近 FORECE 有问小邪关于如何防搜索引擎跟踪重定向的方法，小邪把自己用的代码送给大家。<br />
> 另外，小邪完成了个网站收录查询程序，因为是网友跟小邪买的，所以只写心得，代码不能公开鸟。</p>
<p><img src='http://www.rainmoe.com/wp-content/uploads/2010/08/Cap0000911.png' /></p>
<p><span id="more-2013"></span><strong>一. 防搜索引擎跟踪的重定向代码：</strong></p>
<p>> 用法，像以下三种方法都可以顺利重定向到 www.evlos.org -</p>
<p>> http://之前的URL地址/下面代码保存成的PHP文件.php?http://www.evlos.org/<br />
> http://之前的URL地址/下面代码保存成的PHP文件.php?https://www.evlos.org/<br />
> http://之前的URL地址/下面代码保存成的PHP文件.php?www.evlos.org</p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">
&lt;?php
if (isset($_SERVER['QUERY_STRING'])) {
	if (!$_SERVER['QUERY_STRING']=='') {
		$urlto = $_SERVER['QUERY_STRING'];
		if (preg_match('/^http:\/\/|^https:\/\//i',$urlto)) { $urlto = '&quot;'.$urlto.'&quot;'; }
		else { $urlto = '&quot;http://'.$urlto.'&quot;'; }
	}
	else { $urlto = '&quot;/&quot;'; }
}
else { $urlto = '&quot;/&quot;'; }
?&gt;
&lt;head&gt;&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
&lt;title&gt;LinkManager&lt;/title&gt;&lt;/head&gt;&lt;body&gt;
&lt;script language=&quot;javascript&quot;&gt;location.replace(&lt;?php echo $urlto; ?&gt;);&lt;/script&gt;
&lt;/body&gt;&lt;/html&gt;
</pre>
<p>> 如果只输入 http://之前的URL地址/下面代码保存成的PHP文件.php，或者?后面为空。<br />
> 则直接转向到 http://之前的URL地址。</p>
<p><strong>二. 网站收录查询程序编写手记：</strong></p>
<pre class="brush: jscript; auto-links: false; html-script: false; title: ; notranslate">
&lt;input class=&quot;url_input&quot; type=&quot;text&quot; name=&quot;name&quot; value=&quot;&quot;/&gt;
//下面的jQuery代码可以把上面input元素的value值取出来放到iurl里面
var iurl=$('#box .url_input').attr(&quot;value&quot;);

$('#box .nums td').html('&lt;img style=&quot;padding:2px 0;&quot; src=&quot;ev_siteinfo/loading.gif&quot; /&gt;');
//jQuery的.html的方法就可以把代码中的图片显示出来，而下面的text就只能显示出代码内容
$('#box .nums td').text('&lt;img style=&quot;padding:2px 0;&quot; src=&quot;ev_siteinfo/loading.gif&quot; /&gt;');

idata=$.ajax({
	type:'GET', //先过GET提交
	dataType:'text', //数据类型
	url:'chk.php', //提交地址
	data:'url='+iurl, //参数
	success:function() {
		$('#box .num').html(idata.responseText); //提交成功以后把返回数据显示出来
	}
});
//这是Low level ajax方法
</pre>
<p>> 嘿嘿，其实程序并不难，主要的亮点小邪都写在这里了。<br />
> 其他获取数据也就是正则的问题，就不细说咯。</p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">
$data = mysql_fetch_array(mysql_query('select * from ev_siteinfo where url=&quot;'.$url.'&quot; limit 1'));
//使用mysql语句查询是否存在这个DOMAIN域名
if ($data=='') {
	//如果不存在这样的数据，则新增一条
}
else {
	//存在则直接提取出数据，这样的效果放在index.php，与ajax不冲突
}
</pre>
<p><strong>三. 尾记：</strong></p>
<p>> 文章顶部图中的资料来自于 - <a target='_blank' rel='nofollow' href='http://www.williamlong.info/archives/375.html'>http://www.williamlong.info/archives/375.html</a></p>
<p><img src='http://www.rainmoe.com/wp-content/uploads/2010/08/Cap0000908.png' /></p>
<p>> 看我们的淫荡大军 o(*￣▽￣*)ゞ -<br />
> 熟悉这个圈子的人都知道在哪里，嘿嘿，吊你胃口就不说鸟 -</p>
<p>> 最近流行 “暗恋”，嘿嘿，所以小邪就把个人喜欢的博客基本都加到友链列表里去鸟，且慢慢补充中。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rainmoe.com/2010/08/19/redirect-function-with-unfriendly-search-engine-code-and-siteinfo-program/feed/</wfw:commentRss>
		<slash:comments>148</slash:comments>
		</item>
		<item>
		<title>用JavaScript控制搜索引擎抓取</title>
		<link>http://www.rainmoe.com/2010/02/04/javascript-limit-the-search-engine/</link>
		<comments>http://www.rainmoe.com/2010/02/04/javascript-limit-the-search-engine/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 15:08:12 +0000</pubDate>
		<dc:creator>小邪</dc:creator>
				<category><![CDATA[作品 [Work]]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://www.evlos.org/?p=1913</guid>
		<description><![CDATA[> 小邪去上海时貌似衣服没穿够，结果回来以后，就灰常杯具地发骚鸟，╮囧╭，是发烧来着。

> 然后小邪在被窝里窝了一整天的时间，才感觉好了一点儿。终于今天，小邪又站起来啦。



<span class="readmore"><a href="http://www.rainmoe.com/2010/02/04/javascript-limit-the-search-engine/" title="用JavaScript控制搜索引擎抓取">阅读全文——共1000字</a></span>]]></description>
			<content:encoded><![CDATA[<p>> 小邪去上海时貌似衣服没穿够，结果回来以后，就灰常杯具地发骚鸟，╮囧╭，是发烧来着。<br />
> 然后小邪在被窝里窝了一整天的时间，才感觉好了一点儿。终于今天，小邪又站起来啦。</p>
<p><img src='http://www.rainmoe.com/wp-content/uploads/old/Cap0000054.jpg' /></p>
<p>> 这段代码可以防止搜索引擎的访问，如果有啥链接，不希望搜索引擎读取导致降低权重。<br />
> 就把这段代码给加上吧，呵呵，感觉还是蛮有效滴 O(∩_∩)O，祝大家玩得愉快，╮(╯▽╰)╭。</p>
<p><span id="more-1913"></span><strong>一. 使用方法：</strong></p>
<p>> 首先把代码保存成一个文件，比如 Link.php，然后放在根目录或某个带默认文档的目录中。</p>
<p>> 链接地址如果是 http://www.evlos.org/ 的话，就修改成如下的样子即可，╮(╯▽╰)╭。<br />
> http://u.evlos.org/link.php?http://www.evlos.org/ 像前面的这个样子，嘎嘎。</p>
<p><img src='http://www.rainmoe.com/wp-content/uploads/old/Cap0000055.jpg' /></p>
<p>> 链接地址如果是 www.evlos.org 的话，那么就修改成下面的样子，程序会自动识别的。<br />
> http://u.evlos.org/link.php?www.evlos.org 嘻嘻，就像戴了套似的，放心，哇咔咔。</p>
<p>> 也就是说其实只要在任何链接的前面加上 http://u.evlos.org/link.php? 就 OK 鸟。</p>
<p><strong>二. 程序原理：</strong></p>
<p>> 呵呵，具体的可以查看《Google 网站管理员指南》中 “技术指南” 中的第一条关于Js的说明。<br />
> 传送门 - <a target='_blank' rel='nofollow' href='http://www.google.com/support/webmasters/bin/answer.py?answer=35769'>http://www.google.com/support/webmasters/bin/answer.py?answer=35769</a></p>
<p><img src='http://www.rainmoe.com/wp-content/uploads/old/Cap0000052.jpg' /></p>
<p><strong>三. 源代码：</strong></p>
<p>> 其实源代码很简单。不存在参数或参数无效，则转向到此文件的目录地址，即访问默认文档。<br />
> 如果参数存在，则检查是否带了 Http://，如果没有就给它加上去，有则直接转向至目标。<br />
> 下面的转向则使用了搜索引擎无法访问的 JavaScript 代码，即用 JS 挡住搜索引擎的读取。</p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">
&lt;?php
if (isset($_SERVER['QUERY_STRING'])) {
	if (!$_SERVER['QUERY_STRING']=='') {
		$urlto = $_SERVER['QUERY_STRING'];
		if (preg_match('/^http:\/\//i',$urlto)) {
			$urlto = '&quot;'.$urlto.'&quot;';
		}
		else {
			$urlto = '&quot;http://'.$urlto.'&quot;';
		}
	}
	else {
		$urlto = '&quot;/&quot;';
	}
}
else {
	$urlto = '/';
}
?&gt;
&lt;head&gt;&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
&lt;title&gt;LinkManager&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;script language=&quot;javascript&quot;&gt;
location.replace(&lt;?php echo $urlto; ?&gt;);&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;
</pre>
<p><strong>四. 菠萝阁奇趣发现：</strong></p>
<p>> 话说小邪看了《十月围城》以后，觉得春哥的《粉末》这首歌还是不错滴，想发到虾米的说。<br />
> 杯具的是，管理员说是未正式发行单曲，拒绝收录。╮(╯▽╰)╭，想听的盆友过下面传送呐。</p>
<p><img src='http://www.rainmoe.com/wp-content/uploads/old/Cap0000056.jpg' /></p>
<p>> 8Box 强力传送门 - <a target='_blank' rel='nofollow' href='http://www.8box.com/share/s/661207'>http://www.8box.com/share/s/661207</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rainmoe.com/2010/02/04/javascript-limit-the-search-engine/feed/</wfw:commentRss>
		<slash:comments>87</slash:comments>
		</item>
		<item>
		<title>将Google搜索引擎嵌入Inove</title>
		<link>http://www.rainmoe.com/2009/10/09/conflate-google-and-inove/</link>
		<comments>http://www.rainmoe.com/2009/10/09/conflate-google-and-inove/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 03:51:00 +0000</pubDate>
		<dc:creator>小邪</dc:creator>
				<category><![CDATA[代码 [Code]]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[inove]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.evlos.org/?p=516</guid>
		<description><![CDATA[此方法针对Inove模板

非此模板的童鞋请注意修正

请原谅我在代码段某些不重要的地方空行

<span class="readmore"><a href="http://www.rainmoe.com/2009/10/09/conflate-google-and-inove/" title="将Google搜索引擎嵌入Inove">阅读全文——共1697字</a></span>]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.rainmoe.com/wp-content/uploads/old/Capture279.JPG" /></p>
<p>此方法针对Inove模板<br />
非此模板的童鞋请注意修正<br />
请原谅我在代码段某些不重要的地方空行<br />
为了让IE的阅读性更好 虽然我很讨厌IE<br />
推荐用Chrome ..</p>
<p>步骤：<br />
> 首先当然是申请一个Google自定义搜索引擎<br />
> 得到搜索框代码</p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">
&lt;form action=&quot; http://www.evlos.org/gsearch &quot; id=&quot;cse-search-box&quot;&gt;
  &lt;div&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;cx&quot; value=&quot;你的Google自定义搜索引擎Key&quot; /&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;cof&quot; value=&quot;FORID:9&quot; /&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;ie&quot; value=&quot;UTF-8&quot; /&gt;
    &lt;input type=&quot;text&quot; name=&quot;q&quot; size=&quot;31&quot; /&gt;
    &lt;input type=&quot;submit&quot; name=&quot;sa&quot; value=&quot;搜索&quot; /&gt;
  &lt;/div&gt;
&lt;/form&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://www.google.com/cse/brand?form=cse-search-box&amp;lang=zh-Hans&quot;&gt;
&lt;/script&gt;
</pre>
<p><span id="more-516"></span>> 以及结果代码</p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">
&lt;div id=&quot;cse-search-results&quot;&gt;&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  var googleSearchIframeName = &quot;cse-search-results&quot;;
  var googleSearchFormName = &quot;cse-search-box&quot;;
  var googleSearchFrameWidth = 600;
  var googleSearchDomain = &quot;www.google.com&quot;;
  var googleSearchPath = &quot;/cse&quot;;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://www.google.com/afsonline/show_afs_search.js&quot;&gt;&lt;/script&gt;
</pre>
<p>> 然后需要创建一个给页面用的搜索结果模板<br />
> 当然要在页面顶部用以下代载入Wordpress的头部</p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">
&lt;?php get_header(); ?&gt;
</pre>
<p>> 然后在页面底部用以下代码载入Wordpress的底部</p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">
&lt;?php get_footer(); ?&gt;
</pre>
<p>>也别忘了加上下面代码在顶部表示模板名称</p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">
&lt;?php
/*
Template Name: gsearch
*/
?&gt;
</pre>
<p>> 所以代码就变成这样 我们保存成gsearch.php 并上传到Inove模板目录<br />
> 代码里的googleSearchPath表示搜索结果的页面地址，googleSearchFrameWidth表示宽度<br />
> Inove用606刚刚好 花了我半天测试出来的 完美主义就是连像素也要精确到个位</p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">
&lt;?php
/*
Template Name: gsearch
*/
?&gt;
&lt;?php get_header(); ?&gt;
&lt;div id=&quot;cse-search-results&quot;&gt;&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
  var googleSearchIframeName = &quot;cse-search-results&quot;;
  var googleSearchFormName = &quot;cse-search-box&quot;;
  var googleSearchFrameWidth =606;
  var googleSearchDomain = &quot;www.google.com&quot;;
  var googleSearchPath = &quot;/gsearch&quot;;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://www.google.com/afsonline/show_afs_search.js&quot;&gt;&lt;/script&gt;
&lt;?php get_footer(); ?&gt;
</pre>
<p>> 现在使用这个搜索结果创建一个页面 模板用gsearch<br />
> 创建的时候记下此页ID 即地址栏中post参数<br />
> 将模板目录inove/templates/header.php</p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">wp_list_pages('title_li=0&amp;sort_column=menu_order');</pre>
<p>> 修改一下 像下面一样 用exclude参数隐藏搜索结果页面在Inove模板导航栏的显示</p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">wp_list_pages('title_li=0&amp;sort_column=menu_order&amp;exclude=511');</pre>
<p>> 刚测了下InoveGoogle搜索框的字符空间长度是22个字符 我用微软雅黑 可能有些出入 就统一用20<br />
> 在模板目录inove/templates/header.php中的搜索框代码是</p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">
&lt;form action=&quot;http://www.google.com/cse&quot; method=&quot;get&quot;&gt;
    &lt;div class=&quot;content&quot;&gt;
        &lt;input type=&quot;text&quot; class=&quot;textfield&quot; name=&quot;q&quot; size=&quot;24&quot; /&gt;
        &lt;input type=&quot;submit&quot; class=&quot;button&quot; name=&quot;sa&quot; value=&quot;&quot; /&gt;
        &lt;input type=&quot;hidden&quot; name=&quot;cx&quot;
value=&quot;&lt;?php echo $options['google_cse_cx']; ?&gt;&quot; /&gt;
        &lt;input type=&quot;hidden&quot; name=&quot;ie&quot; value=&quot;UTF-8&quot; /&gt;
    &lt;/div&gt;
&lt;/form&gt;
</pre>
<p>> 我们需要做一些修改 把action里面我的页面地址换成你的页面地址 size用刚才测的20就好</p>
<pre class="brush: php; auto-links: false; html-script: false; title: ; notranslate">
&lt;form action=&quot;http://www.evlos.org/gsearch&quot; id=&quot;cse-search-box&quot;&gt;
  &lt;div class=&quot;content&quot;&gt;
    &lt;input type=&quot;text&quot; class=&quot;textfield&quot; id=&quot;searchtxt&quot; name=&quot;q&quot; size=&quot;20&quot; /&gt;
    &lt;input type=&quot;submit&quot; class=&quot;button&quot;  id=&quot;searchbtn&quot; name=&quot;sa&quot; value=&quot;&quot; /&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;cx&quot;
value=&quot;&lt;?php echo $options['google_cse_cx']; ?&gt;&quot; /&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;cof&quot; value=&quot;FORID:9&quot; /&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;ie&quot; value=&quot;UTF-8&quot; /&gt;
  &lt;/div&gt;
&lt;/form&gt;
</pre>
<p>> 在iNove的主题选项中，把使用Google自定义引擎勾起来，填上你的google自定义搜索引擎key<br />
> 呼 累死了 写了这么长 看我这么累的份上 要是对你有用就留言支持下吧</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rainmoe.com/2009/10/09/conflate-google-and-inove/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using memcached (Feed is rejected)
Page Caching using memcached
Database Caching 1/17 queries in 0.011 seconds using memcached
Object Caching 296/328 objects using memcached

Served from: www.rainmoe.com @ 2012-02-09 17:02:23 -->
