php Banner Rotator Script

5 replies
first off...
Hello everyone... so I am new to ALL of this and I am already getting very nice CPA results (using cpatrend.com) compared to my adsense account.

I have a very strong background in .php and .asp and this came to very good use when I was applying for the different cpa offers.

I searched the forum and didn't find any "source code"/direct scripts that will help you out other than wordpress scripts.

Here's a simple/small raw php script that will rotate content for you!
In my situation I am using 728x90 banners:

<?php
$advert = array();

$advert[] = '<a href="link 1 here"><img src="banner 1 image here"></a>';
$advert[] = '<a href="link 2 here"><img src="banner 2 image here"></a>';
$advert[] = '<a href="link 3 here"><img src="banner 3 image here"></a>';

shuffle($advert);
echo $advert[0];
?>

if you have any questions or need any help just post them up!
#banner #php #rotator #script
  • Profile picture of the author willmartinapj
    well thats more random than rotator but still pretty cool.
    {{ DiscussionBoard.errors[2824811].message }}
  • Profile picture of the author flashing2008
    this is what i want to get ,thank you.
    {{ DiscussionBoard.errors[2852272].message }}
  • Profile picture of the author littlekid
    hm.. nice script.
    i just found that this is pretty cool and simple. this can be used with mysql, so the images can be stored on database...
    {{ DiscussionBoard.errors[2853403].message }}
  • Profile picture of the author vikas529
    Hi,

    Have a look at my blog post, i have created a more dynamic script here PHP Code Snippets: Banner Ad Rotator Using PHP, Jquery & Ajax using php, jqery and ajax it can be further optimized using mysql
    {{ DiscussionBoard.errors[10126220].message }}
  • Profile picture of the author ss2k
    Wouldn it be simpler to just use javascript?
    {{ DiscussionBoard.errors[10128676].message }}

Trending Topics