Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 810617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T00:54:52+00:00 2026-05-15T00:54:52+00:00

I am working on The ausdcf.org to try adding several banner ads in swf

  • 0

I am working on The ausdcf.org to try adding several banner ads in swf format to the top.

Everything starts to work, but I’ve got several questions that need your help:

The client chose not to go with Google AdManager, but prefer a "minimal approach" to do this task.

What I am trying to do is sort of "mimicking" the way Google AdManager does for banners, that is, to split the chance of each particular swf to be shown to the visitor evenly among the banner collection.

Definitely I can add some jQuery code to do this from client-side, a random number generator and if-else statement would work – just $.load() it!

However, what if I’d like to make sure those disabled Javascript (is there any now btw?) still be able to see different swfs in each visit.

Any suggestion on how to approach this?

Many thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T00:54:53+00:00Added an answer on May 15, 2026 at 12:54 am

    The keyword you’re looking for is “rotation script” or “banner rotator”, and server-side is definitely the way to do something like this.

    For PHP, try:

    //available banners
    $banners = array(
       'banner1.swf',
       'banner2.swf',
       'banner3.swf'
    
       //add more here
    );
    
    //get random banner
    srand((double) microtime() * 1000000);
    $rand = rand(0,count($banners)-1);
    
    //display it
    echo $banners[$rand];
    

    This won’t evenly rotate the inventory, just randomly. To rotate banners evenly, you’d have to keep track of things. Let me know if you need that and I’ll post it here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Working example: http://alpha.jsfiddle.net/gTpWv/ Both of the methods work separately, but once regexp for smilies
Working on a page with multiple sections. at the very top there is a
Working through the five minute Xtext tutorial (http://www.eclipse.org/Xtext/documentation/2_1_0/010-xtext-in-5-minutes.php) I get to Generating The Language
Working with a Lucene index, I have a standard document format that looks something
Working with Android I've got an error while I try to show a progressbar
Working with a base64 encoding for Azure (http://msdn.microsoft.com/en-us/library/dd135726.aspx) and I dont seem to work
Working on N2 CMS I'm adding my own content type Product . I derive
Working on a somewhat complex page for configuring customers at work. The setup is
Working on my first Android app here. I've searched and tried everything I can
Working good with iPad but not iPhone Any code can I direction to iPad

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.