<?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>PHP Tutorials Code Snippets and Php Tips &#187; php deny ip address</title>
	<atom:link href="http://readytousesolutions.com/phpblog/tag/php-deny-ip-address/feed/" rel="self" type="application/rss+xml" />
	<link>http://readytousesolutions.com/phpblog</link>
	<description>PHP tutorials - Examples of the most useful scripts</description>
	<lastBuildDate>Thu, 23 Sep 2010 06:54:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>PHP Tutorial : Block certain IP Address</title>
		<link>http://readytousesolutions.com/phpblog/php-tutorial-block-certain-ip-address/</link>
		<comments>http://readytousesolutions.com/phpblog/php-tutorial-block-certain-ip-address/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 21:21:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Usefull PHP]]></category>
		<category><![CDATA[block ip address]]></category>
		<category><![CDATA[deny ip address]]></category>
		<category><![CDATA[php 404 not found header]]></category>
		<category><![CDATA[php block certain visitor ip address]]></category>
		<category><![CDATA[php block ip address]]></category>
		<category><![CDATA[php deny ip address]]></category>
		<category><![CDATA[php detect ip]]></category>
		<category><![CDATA[php ip]]></category>
		<category><![CDATA[php ip address]]></category>
		<category><![CDATA[php send 404 error]]></category>
		<category><![CDATA[php show ip]]></category>

		<guid isPermaLink="false">http://www.crivionweb.com/phpblog/?p=155</guid>
		<description><![CDATA[I see this seems to be a very hot subject on the folks searching for php scripts and help. Its not really big deal to block a certain visitor IP Address. It works like : first you need to detect &#8230; <a href="http://readytousesolutions.com/phpblog/php-tutorial-block-certain-ip-address/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I see this seems to be a very hot subject on the folks searching for php scripts and help. Its not really big deal to block a certain visitor IP Address. It works like : first you need to detect their IP, then you just send him a 404 not found header. Have a look:</p>
<pre class="php">
<span class="phpScriptTag"><span class="phpOperator">&lt;</span><span class="phpOperator">?</span>php</span>
$ip <span class="phpOperator">=</span> <span class="phpScriptVar">$_SERVER</span><span class="phpOperator">[</span><span class="phpString">'REMOTE_ADDR'</span><span class="phpOperator">]</span><span class="phpText">;</span>
$blocked <span class="phpOperator">=</span> <span class="phpString">"127<span class="phpOperator">.</span><span class="phpNumber">0</span><span class="phpOperator">.</span><span class="phpNumber">0</span><span class="phpOperator">.</span><span class="phpNumber">1</span>"</span><span class="phpText">;</span>
<span class="phpKeyword">
if<span class="phpOperator">(</span></span>$ip <span class="phpOperator"><span class="phpOperator">=</span>=</span> $blocked<span class="phpOperator">)</span> <span class="phpOperator">{</span>
<span class="phpFunction">header</span><span class="phpOperator">(</span><span class="phpString">"HTTP/<span class="phpNumber">1</span><span class="phpOperator">.</span><span class="phpNumber">0</span> 404 Not Found"</span><span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpFunction">exit</span><span class="phpOperator">(</span><span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpOperator">}</span>
<span class="phpScriptTag"><span class="phpOperator">?</span><span class="phpOperator">&gt;</span></span>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://readytousesolutions.com/phpblog/php-tutorial-block-certain-ip-address/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

