SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: Ad Rotation

  1. #1
    Serial Publisher silver trophy aspen's Avatar
    Join Date
    Aug 1999
    Location
    East Lansing, MI USA
    Posts
    12,939
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Ad Rotation

    I need to make or get an ad rotation script...

    But I need to be able to link to it like a banner network.

    http://www.domain.com/ads/random-numbers/

    It'll be using Linux and Apache, virtual server. I know it'll take some server settings to set up, but I'm not really sure how I'd go about doing it. Process it with php and then send a header for the correct image or what?

    Also does anyone know of an ad rotation script that does this? Save me some work of doing it myself.
    Chris Beasley - I publish content and ecommerce sites.
    Featured Article: Free Comprehensive SEO Guide
    My Guide to Building a Successful Website
    My Blog|My Webmaster Forums

  2. #2
    SitePoint Wizard johnn's Avatar
    Join Date
    Mar 2001
    Location
    Southern California, USA
    Posts
    1,181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    http://www.zend.com/zend/tut/banner.php

    I haven't tried it yet.
    John

  3. #3
    Serial Publisher silver trophy aspen's Avatar
    Join Date
    Aug 1999
    Location
    East Lansing, MI USA
    Posts
    12,939
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thats a simple banner rotation script, thats not what I need.

    I need one that can be accessed from a non php page or from anywhere.

    Just like you have if you sign up with an ad network or CJ.

    Code:
    <a href = "http://adnetwork.com/afilid1389037/banner.cgi?948840"><img src = "http://adnetwork.com/afilid1389037/94880"></a>
    I need to be able to use it like that. I just don't know where to start. I think what I need to do is have it point to a script where I can process the request and then send image headers, but I'm not sure.
    Chris Beasley - I publish content and ecommerce sites.
    Featured Article: Free Comprehensive SEO Guide
    My Guide to Building a Successful Website
    My Blog|My Webmaster Forums

  4. #4
    PHP Developer W1LL's Avatar
    Join Date
    Apr 2001
    Location
    Leicester, UK
    Posts
    459
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Surely just use JavaScript?

    Code:
    <script language="javascript">
    var a = (Math.round(Math.random()*2)+1)
    
    if (a == 1)
     {
      document.write("<a href=http://1.com>http://1.com</a>");
     }
    else if (a == 2)
     {
      document.write("<a href=http://2.com>http://2.com</a>");
     }
    else if (a == 3)
     {
      document.write("<a href=http://3.com>http://3.com</a>");
     }
    </script>
    This script displays a random link, out of three (from 1 to 3)
    Fiddle about with this until you get what you want, it is only very simple.

    - Will

  5. #5
    Serial Publisher silver trophy aspen's Avatar
    Join Date
    Aug 1999
    Location
    East Lansing, MI USA
    Posts
    12,939
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nope, I have to be able to access it via an img link and an href link.
    Chris Beasley - I publish content and ecommerce sites.
    Featured Article: Free Comprehensive SEO Guide
    My Guide to Building a Successful Website
    My Blog|My Webmaster Forums


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
  •