• I am using the following PHP code on Ad Inserter and i noticed its not blocking anything

    <?php 
    
      if( aicp_can_see_ads() ) : // This part will show ads to your non-banned visitors
    
     ?>
    <br>
    <strong><h3 style="text-align: center;">-advertisement-</h3></strong>
             <div class="aicp">
             
             <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5001095261431714"
         crossorigin="anonymous"></script>
    <!-- Display -->
    <ins class="adsbygoogle"
         style="display:block"
         data-ad-client="ca-pub-5001095261431714"
         data-ad-slot="2600836311"
         data-ad-format="auto"
         data-full-width-responsive="true"></ins>
    <script>
         (adsbygoogle = window.adsbygoogle || []).push({});
    </script>
    
    <p style="text-align: center;">continue reading below</p>
             
             </div><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><!-- end of the aicp div -->
     
     <?php
         else :
      
             echo 'You have been blocked from seeing ads.';
         endif;
     ?>

    Can you please help fix the code if something is wrong

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Thread Starter jhaytex

    (@jhaytex)

    I must say I have try to fix the code and it’s now working but not perfectly, it blocks the country I don’t want it to show too but it’s not blocking invalid clicks

    <?php 
    	if( aicp_can_see_ads() ) { // This part will show ads to your non-banned visitors
    		$adCode = '<div class="aicp"><br>
    <strong><h3 style="text-align: center;">-advertisement-</h3></strong><!-- Don\'t forget to add this div with aicp class -->
    		<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5001095261431714"
         crossorigin="anonymous"></script>
    <!-- Display -->
    <ins class="adsbygoogle"
         style="display:block"
         data-ad-client="ca-pub-5001095261431714"
         data-ad-slot="2600836311"
         data-ad-format="auto"
         data-full-width-responsive="true"></ins>
    <script>
         (adsbygoogle = window.adsbygoogle || []).push({});
    </script></div><p style="text-align: center;">continue reading below</p><!-- end of the aicp div -->';
    		echo $adCode;
    	} else { // Anything within this part will be shown to your banned visitors or to the blocked country visitors
    		echo 'you have be blocked from viewing this ads';
    	}
    ?>

    Please what’s am I doing wrong

Viewing 1 replies (of 1 total)
  • The topic ‘[NSFW] AdSense Invalid Click Protector Not Blocking’ is closed to new replies.