Need Script to Manage Ads Across Multiple Domains

soltzer

Newbie
Joined
Mar 10, 2009
Messages
7
Reaction score
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!
 
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; ?>
 
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?
 
can you just use an iframe? one problem i see is that all ads must be same size.
 
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.
 
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?

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:
Back
Top