How To ? Get Alternative Ads to point to a Chitika Ad? (PhpAdsNew?)

Discussion in 'Placement / Reviews / Examples' started by Dekker, Nov 7, 2005.

  1. #1
    I have PhpAdsNew rotating Google Adsense and Chitika.

    But I want it to show a Chitika ad when Google Adsense can't display an ad...

    How do I do this?
     
    Dekker, Nov 7, 2005 IP
  2. Shoemoney

    Shoemoney $

    Messages:
    4,474
    Likes Received:
    588
    Best Answers:
    0
    Trophy Points:
    295
    #2
    use a url in your alternate adsense ad like alt.php

    then in alt.php use your php include code ;)
     
    Shoemoney, Nov 7, 2005 IP
  3. Dekker

    Dekker Peon

    Messages:
    4,185
    Likes Received:
    287
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks, does it need to be centered or anything like that? i use the iframes invocation (some issues with AJAX)
     
    Dekker, Nov 7, 2005 IP
  4. GeorgeB.

    GeorgeB. Notable Member

    Messages:
    5,695
    Likes Received:
    288
    Best Answers:
    0
    Trophy Points:
    280
    #4
    In your Google Adsense code, add this line

    google_alternate_ad_url = "http://YOURSITE.COM.com/468default.html";

    Create a file named 468default.html and place the chitika code in it then upload it to your server.

    Use this BODY tag in your default.html file to ensure the ad shows properly

     
    GeorgeB., Nov 7, 2005 IP
    Wally likes this.
  5. Dekker

    Dekker Peon

    Messages:
    4,185
    Likes Received:
    287
    Best Answers:
    0
    Trophy Points:
    0
    #5
    OK, sorry didn't read that GeorgeB. I will try your suggestion if this doesn't work.

    http://www.gossiprocks.com/alt.php

    Is the location of the alternative Chitika ad.

    The code in the alt.php is this (which was generated by phpadsnew, local invocation)

    <?php
        if (@include(getenv('DOCUMENT_ROOT').'/phpadsnew/phpadsnew.inc.php')) {
            if (!isset($phpAds_context)) $phpAds_context = array();
            $phpAds_raw = view_raw ('', 8, '', '', '0', $phpAds_context);
            echo $phpAds_raw['html'];
        }
    ?>
    
    Code (markup):
    And the alternative URL is set to http://www.gossiprocks.com/alt.php
     
    Dekker, Nov 7, 2005 IP
  6. Wally

    Wally Well-Known Member

    Messages:
    333
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    118
    #6
    Thank you very much, I did not know this and I have searched for such a tip!! I have now tried it and works fine! Thanks.
    (your Dll-Site is good. Maybe you know a answer of my question? The last post: http://forums.digitalpoint.com/showthread.php?t=36286 )
     
    Wally, Nov 7, 2005 IP