Ads in php

Discussion in 'PHP' started by mutley, Jun 23, 2007.

  1. #1
    OK i want to be able to show different ads on my website when ever anyone comes to the site eg every time the pages is re loaded

    and i want to put in a php lnclude file

    how i do this. also the ads if click go on to a site they are talking about lol

    cheers
     
    mutley, Jun 23, 2007 IP
  2. Cesay

    Cesay Peon

    Messages:
    121
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You could create an individual file for each ad like ad1.php, ad2.php ad3.php etc. then include them using the rand() function like:
    <?php
    $ad = 'ad' .rand(1,5). '.php';
    include($ad);
    ?>
    PHP:
     
    Cesay, Jun 23, 2007 IP
  3. mutley

    mutley Peon

    Messages:
    356
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    ok thank you Cesay

    would that be the best way of doing it or is they any other ways
     
    mutley, Jun 23, 2007 IP
  4. CodyRo

    CodyRo Peon

    Messages:
    365
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Best way? No.. but it depends what you need / want exactly. Want any sort of tracking to see which ads people are clicking on? A backend with easy management?

    Theres plenty of options, the most popular free ad script is Openads which is pretty robust.
     
    CodyRo, Jun 23, 2007 IP
  5. Brewster

    Brewster Active Member

    Messages:
    489
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    60
    #5
    There are loads of ways of doing this.

    Have a look at the solution provided by http://www.openads.org

    Brew
     
    Brewster, Jun 23, 2007 IP
  6. mutley

    mutley Peon

    Messages:
    356
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #6
    i dont think open ads dose what i want it to do i want people to pay for a the ad banners. And a scripts has a list of the banners and then changes every time the pages is re loaded and plus i cant work out how you get the ads to show on my website

    any other ideas
     
    mutley, Jun 24, 2007 IP
  7. samindika

    samindika Active Member

    Messages:
    336
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #7
    I used open ads.but it take too much time to load ads and a page.
     
    samindika, Jun 24, 2007 IP