The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Auto banner installation...

Discussion in 'cPanel Developers' started by jpfoster, Oct 22, 2004.

  1. jpfoster

    jpfoster Registered

    Joined:
    Jul 2, 2004
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I am looking in having free hosting, in my hosting companie.. i already have Cpanel...
    What im looking for is a plugin so.. someone signs up for hosting getsit instanthly and no matter what there is a small ad at the top or footer... is this posible?

    Thanks..
     
  2. onaweb

    onaweb Well-Known Member

    Joined:
    Jan 1, 2004
    Messages:
    76
    Likes Received:
    0
    Trophy Points:
    6
    I think this is an interesting topci and would also be interested in hearing if there are any solutions to this. I may be interested in offering a free or reduced fee hosting plan if a client agrees to display banner ads on their site.

    I have had clients mention they would be will to display ads on the site if they received some kick back for it, but the porblem I always ran into is how to make sure they are not removing the ads. No one has time to sit here and surf everyone's site everyday to see if the ads are there or not.

    Thanks for the great topic,
    Andy
     
  3. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    Put
    Code:
    php_value auto_append_file /home/bannerad.php
    
    AddType application/x-httpd-php htm
    AddType application/x-httpd-php html
    
    in the sites .htaccess file, and the file "/home/bannerad.php" will automatically be added as a footer. For a header, change append to prepend.

    You can put the header or footer file wherever you want and name them whatever you want. Just change the first line.
     
  4. dwykofka

    dwykofka Well-Known Member

    Joined:
    Aug 6, 2003
    Messages:
    394
    Likes Received:
    3
    Trophy Points:
    18
    I tried this and it works great :) thanks for the info

    however on one of my customers sites he runs php nuke and it doesn't show up at all..

    Also I cannot use prepend on some sites that run blogs, Any ideas?

    once again thanks for the info...
     
  5. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    I've looked for a different way to do it because it can't be done like that in some cases, but I haven't found any other way yet.

    I keep wondering if this is how those free host providers add their banner to the top of pages.
     
  6. h2oski

    h2oski Well-Known Member

    Joined:
    Dec 12, 2001
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    6
  7. tinboye22

    tinboye22 Active Member

    Joined:
    Sep 16, 2004
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    I can see this working for non experienced persons, but what about those which are more advanced webmasters??

    if they were to edit the htaccess they could remove these banners.

    I have an alternative solution which i have talked to a programmer about, will cost aprox 150usd to create an addon for the unix server, which adds to the httpd.conf file where it will parse what ever banner you want into any website you specify. Thus not allowing the hosted member to remove the banner.

    If i have this mod made I will post it here about reselling it as I will be paying for the mod and will have full resell rights to the script.


    Anyone interested let me know.
     
  8. dwykofka

    dwykofka Well-Known Member

    Joined:
    Aug 6, 2003
    Messages:
    394
    Likes Received:
    3
    Trophy Points:
    18
    the .htaccess file does not have to be wx by the user

    for example:
    -rw-r--r-- 1 root root 157 Oct 23 21:21 .htaccess

    It also does not have to be in the users www directory only in their home directory.

    you can point to a file anywhere on the system you want it does not have to be a surfable address.

    I placed my ad.php in /home/

    The only problem I have is with some php scripts fighting the banner. but thats only if you "prepend" , "append" works on everything I have tested...
     
  9. phantom2

    phantom2 Well-Known Member

    Joined:
    Jan 3, 2004
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    6
    I have the same problem. For some reason, some php scripts do not accept headers and footer ads. I think it has something to do with cookies. However, a pop-under, pop-up or floating ad will work fine.

    You might want to go with a floating ad because...

    1. You can have them "Fly in" on page load which catches the surfers attention.
    2. You can use "Rich Media" like Flash which makes it more effective.
    3. It's not apop-up. It's DHTML so they cannot be blocked by pop-up blockers.
    4. You can have it set to automatically disappear after a certain amount of time. For example; If your ad is a 20 second flash movie, have it set to disappear after 25 seconds. Your clients will appreciate it because it does not interfere with their design and it's not permenant.
    5. You can set it to only appear once per browser session. This will make your clients very happy and make your unique visitor stats very accurate.
    6. You can place a small "x" which will close the floating ad down when clicked on.

    ESPN and Yahoo use Floating Ads if you'd like to see an example.
     
  10. dwykofka

    dwykofka Well-Known Member

    Joined:
    Aug 6, 2003
    Messages:
    394
    Likes Received:
    3
    Trophy Points:
    18
    can you paste the code you use?

    I know i'm being lazy but it's been a rough week <G>
     
  11. stdio

    stdio Member

    Joined:
    Oct 18, 2004
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    It's because most of these php scripts use gzip compression. Try locating and replacing ob_start ("gzhandler"); or ("gz_handler"); with ob_start (); it will work in most cases. I have been testing mod_layout using this method and it seems to work. Haven't tried it with .htaccess though.

    Please let me know if you tried.

    Regards,

    Scott
     
  12. kistler

    kistler Well-Known Member

    Joined:
    Jan 27, 2005
    Messages:
    136
    Likes Received:
    0
    Trophy Points:
    16

    i get a Internal Server Error when doing this any help
     
  13. kistler

    kistler Well-Known Member

    Joined:
    Jan 27, 2005
    Messages:
    136
    Likes Received:
    0
    Trophy Points:
    16
    *bump* I still dont know whats going on any help
     
Loading...

Share This Page