Force Ads on most websites

Discussion in 'Site & Server Administration' started by Kwiloo, Mar 5, 2008.

  1. #1
    Hey. I will soon be making a free web hosting forum in which, when users reach a minimum of 25 posts, they have the option to receive a free hosting account.

    Is there a way to force my ads on the bottom of all of the users' websites?

    If you could help, it would be greatly appreciated. :)
     
    Kwiloo, Mar 5, 2008 IP
  2. rllunzmann

    rllunzmann Active Member

    Messages:
    1,796
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    80
    #2
    You'll need a paid script to do this or you could simply require a recip link on their page too.
     
    rllunzmann, Mar 5, 2008 IP
  3. Whitey

    Whitey Active Member

    Messages:
    1,386
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    80
    #3
    I remember seeing a paid script for free hosting, and you can set thing like this. Either it will automaticaly add and ad at the bottom of every page or the user can put it where he likes... :)
     
    Whitey, Mar 5, 2008 IP
  4. tones_ie

    tones_ie Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Dunno if this is any use to u ? found this on my travels...

    http://www.freewebspace.net/forums/showthread.php?t=2194524[code]
    Code (markup):
     
    tones_ie, Mar 5, 2008 IP
  5. Pwner

    Pwner Peon

    Messages:
    176
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Hello, you can create a file with a javascript script created by openads for example (openads is a free ad management system), then add auto_prepend_file or auto_append_file in your php.ini, with auto_prepend_file the file is parsed before the main php and with auto_append_file after the main php, be careful because if the main php is terminated with exit() auto_append_file will not work.

    for example

    auto_prepend_file = pathtothephpfile/code.php
     
    Pwner, Mar 5, 2008 IP
  6. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #6
    You can use things that auto-append files, but that can break peoples' layouts. Newbies are more concious about things like W3C Validation today.

    Look into output filters for whatever webserver you'll use. You may be able to pipe output through an existing find/replace application that replaces "(</body>.*</html>)" with somthing like "Add code\n$1".

    It's hard to say without knowing all the details of what you're going to do & use.
     
    joebert, Mar 5, 2008 IP