1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Need Script to Manage Ads Across Multiple Domains

Discussion in 'General Scripting Chat' started by soltzer, Jan 26, 2011.

  1. soltzer

    soltzer Newbie

    Joined:
    Mar 10, 2009
    Messages:
    7
    Likes Received:
    3
    Hey Guys,

    Hoping you can help me out. I have quite a few sites and updating them manually is very time consuming when I want to swap out ad banners and creatives. Ideally I would like to install one piece of code on each site, and be able to then change what ads are displayed from one central location. That way I can update the current ad and that will be reflected across all of the sites with that code instantly. What is this kind of script called? Any particular ones you recommend? Thanks!
     
  2. locknload007

    locknload007 Jr. VIP Jr. VIP Premium Member

    Joined:
    Apr 14, 2010
    Messages:
    475
    Likes Received:
    67
    I am assuming you can use PHP in your codes? Then I have a very easy solution.

    name one file links.php

    Code:
    <?
    
    //* Once everything is set up, this is the main file to add or change you offers. Once your system is in place, it will be smooth sailing.
    
    switch($id){            
            Case 1:        
            $go='<a href="http://www.jdoqocy.com/click-xxxxxxxx-10820618" target="_top">
    <img src="http://www.awltovhc.com/image-xxxxxxxx-10820618" width="300" height="250" alt="AmericanGreetings.com Free Trial" border="0"/></a>';        
            break;        
            Case 2:        
            $go='<a href="http://www.kqzyfj.com/click-xxxxxxxx-10397471" target="_top">
    <img src="http://www.tqlkg.com/image-xxxxxxxx-10397471" width="468" height="60" alt="American Greetings Ecards- Start Free Trial " border="0"/></a>';        
            break;        
            Case 3:        
            $go='http://www.youraffiliatelinks.com/here'; //*Take the numbers as high as you want, can even skip numbers        
            break;        
            }            
            
            ?>
    Now put this code wherever you want the banner to show

    Code:
    <? 
    
    //* 1 = My Toys site, 2 = My Autoparts site, 3 = My Clickbank site, 6 = Position 6 in all sites, 36= My Clickbank site and in position 6
    
    $id = '1'; //*$id='#' You use this to assign the numbers from above. You have to use numbers only for id. There are all kinds of ways to do this. Site, Position, Site and Position combo numbers, 
    
    ?>
    <? include    ('links.php'); ?>
    <?php  echo $go; ?> 
     
     
  3. soltzer

    soltzer Newbie

    Joined:
    Mar 10, 2009
    Messages:
    7
    Likes Received:
    3
    Thanks for the idea! Unfortunately, it doesn't seem to work. I'm not sure if PHP isn't allowed in the ad codes (I've used javascript snippets in there before, like adsense), but I can't get my creatives to display. Does the "links.php" file need to be hosted on the same domain or can it be hosted on another?
     
  4. gacott

    gacott Junior Member

    Joined:
    Mar 10, 2009
    Messages:
    153
    Likes Received:
    62
    Try open X.
     
  5. ktown

    ktown Newbie

    Joined:
    Sep 23, 2010
    Messages:
    28
    Likes Received:
    8
    can you just use an iframe? one problem i see is that all ads must be same size.
     
  6. gacott

    gacott Junior Member

    Joined:
    Mar 10, 2009
    Messages:
    153
    Likes Received:
    62
    I manage over 200 website with all sorts of ads, cpa offers ect with open X. It's as easy as it get's. One bit of code on each site where the ads are to be displayed, open x handles everything from there.
     
  7. locknload007

    locknload007 Jr. VIP Jr. VIP Premium Member

    Joined:
    Apr 14, 2010
    Messages:
    475
    Likes Received:
    67
    It is easiest to do it from the same domain. If not, you need to add a php.ini to allow your sites to access the file that is stored on another domain. You might be able to try absolute path to the file if on the same server. /home/example/public_html/

    If that dont work then

    allow_url_include = On in a 'php.ini

    I think that goes in the folder of the files that will display the banners.

    As far as size that someone else mentioned, it dont matter if the right ad code with the correct size is put in the right id. It will just produce whatever matches in the switch. Basically if I cut and paste the html from CJ that they supply, link and image, and if it fits the id I assign it on my display page, it will display in that area.

    open X does seem good, so look into it.
     
    Last edited: Jan 27, 2011
  8. eternity

    eternity BANNED BANNED

    Joined:
    Dec 16, 2008
    Messages:
    269
    Likes Received:
    22
    Use OpenX

    http://www.openx.org/