<?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>My Quick Fix &#187; AdSense</title>
	<atom:link href="http://myquickfix.co.uk/index.php/category/computers/web-development/adsense/feed/" rel="self" type="application/rss+xml" />
	<link>http://myquickfix.co.uk</link>
	<description>Quick fixes for niggly problems...</description>
	<lastBuildDate>Thu, 24 Sep 2009 15:10:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to disable AdSense adverts on your website</title>
		<link>http://myquickfix.co.uk/index.php/2008/12/how-to-disable-adsense-adverts-on-your-own-site-blog/</link>
		<comments>http://myquickfix.co.uk/index.php/2008/12/how-to-disable-adsense-adverts-on-your-own-site-blog/#comments</comments>
		<pubDate>Sat, 06 Dec 2008 23:01:33 +0000</pubDate>
		<dc:creator>hutch</dc:creator>
				<category><![CDATA[AdSense]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.myquickfix.co.uk/?p=38</guid>
		<description><![CDATA[Problem
Anyone that runs AdSense knows that YOU MUST NEVER CLICK ON YOUR OWN ADS. Now there&#8217;s a very slim chance you might one day accidentally click on an ad, which &#8211; if they are in a bad mood &#8211; might cause Google to suspend your account, or even remove it.
Solution
This is where the &#8216;google_adtest&#8217; variable comes in handy. If you add this PHP code to your AdSense block&#8230;
&#60;?php
if ($_SERVER["REMOTE_ADDR"]==&#8221;XXX.XXX.XXX.XXX&#8221;) {
  echo &#8220;google_adtest=&#8217;on&#8217;;\n&#8221;;
}
?&#62;
&#8230;just above the &#8216;google_ad_client&#8217; variable, substituting &#8216;XXX.XXX.XXX.XXX&#8217; for your home/workplace IP address, whenever you view pages with these ...]]></description>
			<content:encoded><![CDATA[<h2>Problem</h2>
<p>Anyone that runs AdSense knows that YOU MUST NEVER CLICK ON YOUR OWN ADS. Now there&#8217;s a very slim chance you might one day accidentally click on an ad, which &#8211; if they are in a bad mood &#8211; might cause Google to suspend your account, or even remove it.</p>
<h2>Solution</h2>
<p>This is where the &#8216;google_adtest&#8217; variable comes in handy. If you add this PHP code to your AdSense block&#8230;</p>
<blockquote><p><span style="color: #ff0000;">&lt;?php</span><br />
<span style="color: #0000ff;">if ($_SERVER["REMOTE_ADDR"]==&#8221;XXX.XXX.XXX.XXX&#8221;) {<br />
  echo &#8220;google_adtest=&#8217;on&#8217;;\n&#8221;;<br />
}</span><br />
<span style="color: #ff0000;">?&gt;</span></p></blockquote>
<p>&#8230;just above the &#8216;google_ad_client&#8217; variable, substituting &#8216;XXX.XXX.XXX.XXX&#8217; for your home/workplace IP address, whenever you view pages with these ads on, they will be in test mode. If you click on them, they don&#8217;t register, and the advertiser doesn&#8217;t get charged. Blow is a full AdSense block example:</p>
<blockquote><p><span style="color: #008000;">&lt;script type=&#8221;text/javascript&#8221;&gt;&lt;!&#8211;</span><br />
<span style="color: #ff0000;">&lt;?php</span><br />
<span style="color: #0000ff;">if ($_SERVER["REMOTE_ADDR"]==&#8221;111.222.333.444&#8243;) {<br />
  echo &#8220;google_adtest=&#8217;on&#8217;;\n&#8221;;<br />
}</span><br />
<span style="color: #ff0000;">?&gt;</span><br />
<span style="color: #008000;">google_ad_client = &#8220;pub-#############&#8221;;<br />
google_ad_slot = &#8220;##########&#8221;;<br />
google_ad_width = ###;<br />
google_ad_height = ###; //&#8211;&gt;<br />
&lt;/script&gt;<br />
&lt;script type=&#8221;text/javascript&#8221; src=&#8221;http://pagead2.googlesyndication.com/pagead/show_ads.js&#8221;&gt;<br />
&lt;/script&gt;</span></p></blockquote>
<p>If you have no idea what your IP address is, try: <a href="http://whatsmyip.org/">http://whatsmyip.org/</a></p>
<p><strong>Please note:</strong> This method won&#8217;t work if you&#8217;re site doesn&#8217;t run PHP (obviously, but it could be done with ASP or any other scripting techs) and won&#8217;t work if you don&#8217;t have a fixed IP.</p>
]]></content:encoded>
			<wfw:commentRss>http://myquickfix.co.uk/index.php/2008/12/how-to-disable-adsense-adverts-on-your-own-site-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
