Jump to content

Rotating adverts from different Affiliate Sites


oatssi46

Recommended Posts

Hi,

I use 3 different affiliate sites, CJ, Affiliate Window and Trade Doubler.  I want to rotate banners from a file using javascript coding from all 3 affiliate sites.  Ideally I would arrange the files by the size of banner.  Does anyone have any ideas as to how this can be done?

Thanks in advance.
Link to comment
Share on other sites

Apologies.  I should have been a bit clearer with my post.

By arranging the files, I meant grouping the banners in a file in terms of size.  E.g. one file containg banners of size 125x125, another file grouping banners 60x125 etc.


An example of what I have is below.  I would like to take the example (placed in a separate file) and display one of the banners on the php page where I have used the includes function.  I need some javascript that will randomly select one of the banners and display it accordingly:


<scrpt language="javascript">
var uri = 'http://impgb.tradedoubler.com/imp/js/106094/1287396?' + new String (Math.random()).substring (2, 11);
document.write('<sc'+'ript language="JavaScript" src="'+uri+'" charset="ISO-8859-1"></sc'+'ript>');
</scrpt>

<scrpt language="JavaScript" src="http://www.awin1.com/cawshow.php?s=55653&v=669&q=43980&r=66540"></scrpt><noscrpt><iframe src="http://www.awin1.com/cawshow.php?s=55653&v=669&q=43980&r=66540&iframe=1&target=blank" width=468 height=60 frameborder=0 border=0 scrolling=no marginheight=0 marginwidth=0></iframe></noscrpt>

<scrpt type="text/javascript" language="javascript" src="http://www.kqzyfj.com/placeholder-1288778?target=_top&mouseover=N"></scrpt>

Any help is much appreciated.  Many thanks.

Link to comment
Share on other sites

The coding above are the output codes from the different affiliate sites.  I don't think there is too much of an emphasis in where I say group in a file.  I simply mean I will have different files for different size banners. 

The code above is an example of what I would like to place and randomly rotate in a file.  However, I need some code that will randomly rotate the scripts?

Thanks
Link to comment
Share on other sites

Ok, i'll try to make this a bit clearer - sorry you have not understood me as yet! 

Lets say I have one file which I call with the includes function.  Forget about size.  It contains 3 different adverts from 3 different affiliate sites:

"<scrpt language="javascript">
var uri = 'http://impgb.tradedoubler.com/imp/js/106094/1287396?' + new String (Math.random()).substring (2, 11);
document.write('<sc'+'ript language="JavaScript" src="'+uri+'" charset="ISO-8859-1"></sc'+'ript>');
</scrpt>

<scrpt language="JavaScript" src="http://www.awin1.com/cawshow.php?s=55653&v=669&q=43980&r=66540"></scrpt><noscrpt><iframe src="http://www.awin1.com/cawshow.php?s=55653&v=669&q=43980&r=66540&iframe=1&target=blank" width=468 height=60 frameborder=0 border=0 scrolling=no marginheight=0 marginwidth=0></iframe></noscrpt>

<scrpt type="text/javascript" language="javascript" src="http://www.kqzyfj.com/placeholder-1288778?target=_top&mouseover=N"></scrpt>
"

I want to randomly select one of the above adverts to display on the page where I have the includes function.  Any ideas?

I hope i'm making myself clear, my terminology isn't brilliant.

Many thanks.
Link to comment
Share on other sites

[quote author=fenway link=topic=109294.msg443473#msg443473 date=1159498685]
So you only want to incorporate the resulting image from ONE of these script blocks?  I'm not sure what these produce.
[/quote]

Yep thats right.  It would produce an ad banner such as what can be seen at the bottom of the following page:

http://www.paddockgossip.com/newsletter/

Maybe a javascript array would work best as michael suggested?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.