jpfoster

Registered
Jul 2, 2004
3
0
151
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..
 

onaweb

Well-Known Member
Jan 1, 2004
76
0
156
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
 

PWSowner

Well-Known Member
Nov 10, 2001
2,901
4
343
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.
 

dwykofka

Well-Known Member
Aug 6, 2003
394
3
168
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...
 

PWSowner

Well-Known Member
Nov 10, 2001
2,901
4
343
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.
 

tinboye22

Active Member
Sep 16, 2004
29
0
151
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.
 

dwykofka

Well-Known Member
Aug 6, 2003
394
3
168
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...
 

phantom2

Well-Known Member
Jan 3, 2004
59
0
156
dwykofka said:
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...
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.
 

stdio

Member
Oct 18, 2004
19
0
151
dwykofka said:
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...
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
 

kistler

Well-Known Member
Jan 27, 2005
133
1
166
squirrel said:
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.

i get a Internal Server Error when doing this any help