<?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>Saturngod &#187; Bot</title>
	<atom:link href="http://en.saturngod.net/tag/bot/feed" rel="self" type="application/rss+xml" />
	<link>http://en.saturngod.net</link>
	<description>My Idea My Life</description>
	<lastBuildDate>Fri, 30 Jul 2010 16:55:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Bot Cover Shield</title>
		<link>http://en.saturngod.net/blogpost/bot-cover-shield</link>
		<comments>http://en.saturngod.net/blogpost/bot-cover-shield#comments</comments>
		<pubDate>Sat, 22 Aug 2009 18:59:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Bot]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Today, I finished Bot Cover Shield with PHP. My blog ,www.saturngod.net, always occur CPU limit over and I think many bot come to my blog. So, I stop the bot and I just allow google bot. In Theory, Bot can&#8217;t save cookies (it may be use cookies but not sure). So, I am using saving [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I finished Bot Cover Shield with PHP. My blog ,www.saturngod.net, always occur CPU limit over and I think many bot come to my blog. So, I stop the bot and I just allow google bot. In Theory, Bot can&#8217;t save cookies (it may be use cookies but not sure). So, I am using saving cookies system.</p>
<p>[sourcecode lang="php"]<br />&lt;?php<br />if(isset($_POST['submit_dos'])) <br />{<br />&nbsp;&nbsp;&nbsp; setcookie(&#8220;checkhuman&#8221;, &#8220;process&#8221;, time()+3600);<br />&nbsp;&nbsp;&nbsp; header(&#8220;Location:&#8221;.$_SERVER['HTTP_REFERER' ]);<br />}<br />function chkcookies()<br />{<br />&nbsp;&nbsp;&nbsp; if(isset($_COOKIE["checkhuman"]))<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if($_COOKIE["checkhuman"]==&#8221;process&#8221;)<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return true;<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; else<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return false;<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; else<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return false;<br />&nbsp;&nbsp;&nbsp; }<br />}<br />if(! chkcookies())<br />{</p>
<p>&nbsp;&nbsp;&nbsp; $ip=$_SERVER['REMOTE_ADDR'];</p>
<p>&nbsp;&nbsp;&nbsp; if(($ip != &#8220;66.249.66.1&#8243;) &amp;&amp; ($ip != &#8220;66.249.65.133&#8243;) &amp;&amp; ($ip != &#8220;66.249.67.72&#8243;) &amp;&amp; ($ip != &#8220;66.249.72.137&#8243;))<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; echo &#8220;If you are human click &#8220;;<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; echo &#8220;&lt;form action=&#8217;index.php&#8217; method=post&gt;&#8221;;<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; echo &#8220;&lt;input type=&#8217;submit&#8217; value=&#8217;here&#8217; name=&#8217;submit_dos&#8217; /&gt;&lt;/form&gt;&#8221;;<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; exit();<br />&nbsp;&nbsp;&nbsp; }</p>
<p>}<br />?&gt;<br />[/sourcecode]</p>
<p>I add this code in header.php of wordpress template. So, our blog can cover the bots easily.</p>
]]></content:encoded>
			<wfw:commentRss>http://en.saturngod.net/blogpost/bot-cover-shield/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
