Results 1 to 5 of 5
August 3rd, 2007, 07:15 AM #1How 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?
August 3rd, 2007, 09:06 AM #2
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.
August 3rd, 2007, 09:47 AM #3
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.
August 3rd, 2007, 12:04 PM #4Originally Posted by SeymourButts
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
August 3rd, 2007, 01:24 PM #5
Thanks for the help, but I ended up writing my own in php using the rand() method. Works like a charm.