Results 1 to 5 of 5
  1. #1
    Grandma broke her coccyx! Uncle Rico's Avatar
    Join Date
    May 8th, 2007
    Location
    North Carolina
    Posts
    2,238
    How would I ....... Dynamic Banners/Content
    Change the content of something on a page each time the page gets visited? For example, I wanted to change the banner each time the page is loaded. My pages are coded in php. I don't want a rotating banner on the same page.

    I am thinking I need a pool of different banners that get randomly pulled each time?

  2. #2
    Moderator MichaelColey's Avatar
    Join Date
    January 18th, 2005
    Location
    Mansfield, TX
    Posts
    16,232
    I've renamed and moved your thread, to help you get a better response.

    I'm not sure I understand your last two sentences. It sounds like you are saying two completely opposite things. You say you don't want banner rotations, but that's exactly what you describe as wanting.

    Basically, you're just asking about dynamic/random code. I do something similar by having a database table that contains all the variations and dates that each variation is supposed to run, plus a weight for each one. I call a script that selects from all of the currently active variations, randomly picks one considering the weightings, and outputs it. It's not in PHP, though, and is pretty specialized for my setup.

    If you're just looking to use this for banners, there are some great products out there already. If you're wanting to use it for other components on your site, too, it's easier to just build your own. I use mine to rotate banners, add seasonal options, etc.
    Michael Coley
    Amazing-Bargains.com
     Affiliate Tips | Merchant Best Practices | Affiliate Friendly? | Couponing | CPA Networks? | ABW Tips | Activating Affiliates
    "Education is the most powerful weapon which you can use to change the world." Nelson Mandela

  3. #3
    All Around Web Guy Cursal's Avatar
    Join Date
    January 18th, 2005
    Posts
    829
    Yes, that is correct you would need a "pool" of banners for the script to call up.

    Doing a simple search on "G" shows many free scripts out there for your purpose.

    I have one somewhere. I'll post it later when I have more time.
    Oregon Publishing: Web Development, Graphic Design, Domains & Marketing
    Deluxe Banners Bartender's Guide Cooking Jobs

  4. #4
    ABW Veteran Mr. Sal's Avatar
    Join Date
    January 18th, 2005
    Posts
    6,795
    Quote Originally Posted by SeymourButts
    Change the content of something on a page each time the page gets visited? For example, I wanted to change the banner each time the page is loaded. My pages are coded in php. I don't want a rotating banner on the same page.

    I am thinking I need a pool of different banners that get randomly pulled each time?
    Take your pick:

    The simplest way to add banner ads to your website without the need for a database. PHP RandomRotator will also randomise anything you want including: - Plain text, Images, Banners, Quotes, and Links etc - Source: PHP Random Text Banner Rotator
    or........
    Creating a simple ad-rotator, the ads are stored in a text file and picked randomly by this PHP code - Source: Banner Rotation Using PHP
    Those two are good, free, and simple to use.

  5. #5
    Grandma broke her coccyx! Uncle Rico's Avatar
    Join Date
    May 8th, 2007
    Location
    North Carolina
    Posts
    2,238
    Thanks for the help, but I ended up writing my own in php using the rand() method. Works like a charm.

  6. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. DySE and Dynamic Content
    By Nosmada in forum Cusimano.com Scripts
    Replies: 0
    Last Post: June 17th, 2005, 12:35 AM
  2. Allposters Dynamic Content
    By diverjones in forum Cusimano.com Scripts
    Replies: 2
    Last Post: November 20th, 2003, 01:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •