php script for adsense

Discussion in 'Guidelines / Compliance' started by #Darren, Jul 9, 2006.

  1. #1
    Say I have 100 pages all with identical layout and one adsense ad.

    Can I use a php script to filter the ad through all those pages?

    The reason I ask is, should I ever decide to remove the adsense, I can do it in one edit.

    Darren.
     
    #Darren, Jul 9, 2006 IP
  2. Jenstar

    Jenstar Active Member

    Messages:
    524
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    68
    #2
    As long as no changed to the actual javascript are required, and it isn't being implemented through a new frame (such as an iframe) it should be fine.
     
    Jenstar, Jul 9, 2006 IP
  3. ThomasNederman

    ThomasNederman Peon

    Messages:
    112
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I do this with a PHP script using php include. The php script is responsible for both changing ad color and checking against a database if the page in question should use AD or not

    <?
    include "http://".$_SERVER['SERVER_NAME']."/admanager/?adtype=4&zone=4&key=".$_GET['key'].";";

    ?>
    With using the above, i have several parameters i call the script with, i can choose what ad format i like (and apply a channel to each ad format) as well as different zones and the key is what page i am loading.

    (all this is invisible to the user)
     
    ThomasNederman, Aug 17, 2006 IP
  4. wwm

    wwm Peon

    Messages:
    308
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #4
    with using the above ut opening ur server to exploits!!
     
    wwm, Aug 17, 2006 IP
  5. ThomasNederman

    ThomasNederman Peon

    Messages:
    112
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Even when using

    <Location /admanager>
    Order deny,allow
    Deny from all
    Allow from xxx.xxx.xxx.xxx
    </Location>
    (allowing only access from local IP)
     
    ThomasNederman, Aug 17, 2006 IP