1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Add banner to all pages automatically

Discussion in 'PHP' started by Lawsuit, Apr 17, 2005.

  1. antonaf

    antonaf Banned

    Messages:
    411
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #21
    If you never used Mod_Rewrite then you are opening a whole new can of worms. You will need to know how to write regular expressions. You did a search on mod_rewrite and came up with nothing....impossible! There is tons of information on mod_rewrite (Apache)....have you tried Google. That's assuming you have Apache. If you are using Windows IIS then you will need something like ISAPI Rewrite.

    Regular expressions isn't too bad, once you have it setup and stable you are in good shape, but any drastic site changes in the future may also effect the rewrite code and the expressions will need to be rewritten or more lines added.
     
    antonaf, Apr 19, 2005 IP
  2. Lawsuit

    Lawsuit Banned

    Messages:
    347
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #22
    Ok, thanks, I am 99% sure I have Apachi with my host
     
    Lawsuit, Apr 20, 2005 IP
  3. Stin

    Stin Guest

    Messages:
    264
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #23
    heh then you are 4% of your way there
     
    Stin, Apr 20, 2005 IP
  4. kasl_33

    kasl_33 Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #24
    Did anyone happen to think of the easy way to do this? Well, here is the ultimate solution:

    If your website is hosted on IIS, contact the server administrator and have them set up a server wide header or footer. Doing this will automatically put a header or footer on every page and you won't have to open a single one.

    I am not exactly sure how to do this with Apache, but I believe it is possible using some Add-Handler script of a sort.

    Sure, it requires root access on the server - meaning the Admin would have to do it, but it is really not that big of a deal.

    If your admin can't do it, then you could host your site at www.kasl.info - they would do it.
     
    kasl_33, May 4, 2005 IP
  5. kc3

    kc3 Peon

    Messages:
    857
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #25
    Why not just make a php administrative website accessing a mysql database to store advertisements, than make a strip of code that will read from it and put it in each page. If they're in HTML, you could just put the PHP code between <? and ?> than change the name to *.php, why don't you just do that? Or simply use Java to make it randomly pick banners.
     
    kc3, May 6, 2005 IP