I created a script to view almost all current Adwords ads bidding on a keyword

Wαlrυѕ

Registered Member
Joined
Sep 4, 2017
Messages
58
Reaction score
29
To use the script, install it on a server or use a program like:
https://www.apachefriends.org/index.html
http://www.wampserver.com/en/

This is what it should look like:
pwbHAcL


Here is the code! Download it and save it as ads.php!

PHP:
<html>
    <head>
        <script async="async" src="https://www.google.com/adsense/search/ads.js"></script>

    <!-- other head elements from your page -->

    <script type="text/javascript" charset="utf-8">
    (function(g,o){g[o]=g[o]||function(){(g[o]['q']=g[o]['q']||[]).push(
      arguments)},g[o]['t']=1*new Date})(window,'_googCsa');
    </script>
    </head>
    <body>
    
    <script type="text/javascript" charset="utf-8">

  var pageOptions = {
    "pubId": "pub-9616389000213823", // Make sure this the correct client ID!
    "query": "<?php
    
    if (!isset($_POST['keyword']) || empty($_POST['keyword'])) {
        echo "hotel";
    }else {
        echo $_POST["keyword"];
    }
    
    ?>",
    "adPage": <?php
    
    if (!isset($_POST['page']) || empty($_POST['page'])) {
        echo "50";
    }else {
        echo $_POST["page"];
    }
    
    ?>,
    "number": 25,
  };

  var adblock1 = {
    "container": "afscontainer1",
    "width": "700",
    "number": 25
  };

  var adblock2 = {
    "container": "afscontainer2",
    "width": "700",
    "number": 25
  };

  var adblock3 = {
    "container": "afscontainer3",
    "width": "700",
    "number": 25
  };

  _googCsa('ads', pageOptions, adblock1, adblock2, adblock3);

</script>

    <form action="" method="post">
    Keyword: <input type="text" name="keyword" value="hotel"><br>
    Page: <input type="text" name="page" value="50"><br>
    <input type="submit">
    </form>

    
    <div id='afscontainer1'>Ads will load here...</div>


    
    
    </body>
</html>
 
Hi, I installed the code on my site but it says "Ads will load here..." and nothing happens.

Do you know how to fix this? (My Pub ID code is correct)

Thanks!
 
Hi, I installed the code on my site but it says "Ads will load here..." and nothing happens.

Do you know how to fix this? (My Pub ID code is correct)

Thanks!
Maybe you have adblock enabled
 
Thanks seems to work! Sometimes it doesnt load but refreshing and trying again fixed it :)
 
Back
Top