SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Zealot
    Join Date
    Oct 2006
    Posts
    113
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Random advertising banners...

    This is a question I asked a few years ago, and could never get a straight answer for.

    Lets say I have a few select 468 x 60 banner advertisements I would like to include in my page. Maybe I have in my CSS layout a section called #advertisements.

    But I only want to display one at a time (and randomly), each time the page is loaded. I know this is possible to do with images. However, is it possible to do with the image and a link ref to the image? That is where I would get the "no"s and the unclear answers a few years ago.

  2. #2
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,424
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    Sure. That's something any server-side language can do with a little effort (and not much at that). You can pull the data out of a database or flat file or even hard code into the server-side code itself.

  3. #3
    SitePoint Guru
    Join Date
    Jun 2006
    Posts
    638
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    or use javascript to write the banner on the page.

  4. #4
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,424
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    The only problem with JavaScript is users can turn it off and break your system.

  5. #5
    SitePoint Member
    Join Date
    Feb 2006
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just use http://www.adpeeps.com

    Software Features

    "Easy to use and extremely user-friendly administrative control panel.
    Password protected administration area.
    Can track impressions and clicks on FORM ads!
    Ability to show and track banner, text, and even rich media ads!
    Supports unlimited banner sizes.
    NEW GeoTargeting allows you to target ads to over 200+ specific countries. View Demo
    Ability for advertisers to signup instantly with PayPal or Authorize.net
    Easy to setup targeting categories.
    Day of week targeting capability (can set ads to only display on certain days of the week).
    Ad priority control (allows some banners to be shown more often)
    Supports an unlimited number of advertisers, banners, and target zones.
    Ability to open new browser window when user clicks an ad, making it simple for them to return to your site.
    Supports ALT tags, OnMousever, and target frame.
    Frequency Capping
    Option to reset statistics for entire system, individual campaigns, and individual ads.
    Real-time graphical statistics always at your fingertips.
    Track campaign and ads performance in an array of reports including, 24 hour breakdown, last 14 days, and more!
    Learn which ads perform the best on your website and from what position.
    Banner ads can be locally stored in the MySQL database to eliminate broken images.
    Ability to suspend, modify, or delete campaigns and/or ads.
    Specifically target your ads within categories you define.
    Build-in HTML Code generator allows you to easily generate small snippet of html code.
    Set your ads to expire by impressions, clicks, future days or months.
    Single installation can run ads on unlimited sites.
    IP tracking is supported for increased security and accurate click-through counts.
    Does not use cookies to track banner ads.
    and much much more... "

    -Jon

  6. #6
    SitePoint Zealot webfinity's Avatar
    Join Date
    Oct 2006
    Posts
    179
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    <?php $imagevar=rand(13); if($imagevar==1) { include ("http://www.yoursite.com/banner1.inc"); } else if($imagevar==2) { include ("http://www.yoursite.com/banner2.inc"); } else if($imagevar==3) { include ("http://www.yoursite.com/banner3.inc"); }     ?>
    This is a simple random php script. All you need to do is place the text (banner and link) you want to randomize in the include file (ex. banner1.inc).

  7. #7
    The Mind's I ® silver trophy Dark Tranquility's Avatar
    Join Date
    Sep 2003
    Location
    KSA - UAE
    Posts
    9,457
    Mentioned
    8 Post(s)
    Tagged
    1 Thread(s)
    you can find tons of those on hotscripts.com


Bookmarks

Posting Permissions

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