Go Back   HostGator Peer Support Forums > Public Forums > Pre-Sales Questions

Notices

Reply
 
Thread Tools
  #1  
Old 05-12-2006, 07:18 PM
XpLiCiT XpLiCiT is offline
Hatchling Croc
 
Join Date: May 2006
Posts: 7
Default Advertise on customer accounts

i already have the reseller account but i was wondering if i can put ads on customers accounts, and how exactly would i do that
Reply With Quote
  #2  
Old 05-12-2006, 07:26 PM
quietFinn's Avatar
quietFinn quietFinn is online now
Veteran Croc
 
Join Date: Feb 2005
Posts: 3,549
Default Re: Advertise on customer accounts

If you mean that you'd want to create some kind of "opening soon" page in a newly created account, then in WHM look at: Account Functions -> Skeleton Directory
__________________
quietFinn - netFinn Finland
"Be who you are and say what you feel because those who mind don't matter and those who matter don't mind." - Dr. Seuss
Reply With Quote
  #3  
Old 05-13-2006, 08:26 PM
XpLiCiT XpLiCiT is offline
Hatchling Croc
 
Join Date: May 2006
Posts: 7
Default Re: Advertise on customer accounts

no i want to give people free hosting but i want to stick a banner on there sites.
Reply With Quote
  #4  
Old 05-13-2006, 09:37 PM
esl's Avatar
esl esl is offline
Emperor Croc
 
Join Date: Jan 2005
Location: Proud to be an American - USA
Posts: 2,230
Default Re: Advertise on customer accounts

You can put ads on your clients website, I'm just not sure how you would do that. May be just make the free accounts have a subdomain using your hosting website domain?
__________________
Have a great day,
Evan
Reply With Quote
  #5  
Old 05-16-2006, 09:47 PM
XpLiCiT XpLiCiT is offline
Hatchling Croc
 
Join Date: May 2006
Posts: 7
Default Re: Advertise on customer accounts

someone showed me how they do it using .htaccess file.


php_value output_buffering 4098
AddType application/x-httpd-php htm
AddType application/x-httpd-php html
php_value auto_append_file 'http://xplicit.godzsite.com/footer.html'

problem is whenever i do it it gives me an error. but the same script works on other reseller account

Quote:
Warning: Unknown(): open_basedir restriction in effect. File(/home/lnorman/xplicit/footer.html) is not within the allowed path(s): (/home/xplicit:/usr/lib/php:/usr/local/lib/php:/tmp) in Unknown on line 0

Warning: Unknown(/home/lnorman/xplicit/footer.html): failed to open stream: Operation not permitted in Unknown on line 0

Warning: Unknown(): open_basedir restriction in effect. File(/home/lnorman/xplicit/footer.html) is not within the allowed path(s): (/home/xplicit:/usr/lib/php:/usr/local/lib/php:/tmp) in Unknown on line 0

Warning: Unknown(/home/lnorman/xplicit/footer.html): failed to open stream: Operation not permitted in Unknown on line 0

Warning: (null)(): Failed opening '/home/lnorman/xplicit/footer.html' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in Unknown on line 0


open_basedir stops u from using back path to it so i try using full address http://

then i get this error

Quote:
Warning: Unknown(http://xplicit.godzsite.com/footer.html): failed to open stream: HTTP request failed! in Unknown on line 0

Warning: Unknown(http://xplicit.godzsite.com/footer.html): failed to open stream: HTTP request failed! in Unknown on line 0

Warning: (null)(): Failed opening 'http://xplicit.godzsite.com/footer.html' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in Unknown on line 0
annnyone out there have any idea how i can get around this problem?
Reply With Quote
  #6  
Old 05-17-2006, 03:46 AM
vtrain's Avatar
vtrain vtrain is offline
Royal Croc
 
Join Date: Jan 2004
Location: Limerick - Ireland
Posts: 699
Default Re: Advertise on customer accounts

it seems you have your file in /home/lnorman/xplicit/footer.html and maybe it should be in /home/xplicit/public_html/footer.html ?

Vt
__________________
Vtrain is Linux User #237333 on http://counter.li.org/
"Don't meddle in the affairs of sysadmins,
for they are subtle and quick to anger."

Last edited by vtrain; 05-17-2006 at 06:00 AM.
Reply With Quote
  #7  
Old 05-17-2006, 05:49 AM
quietFinn's Avatar
quietFinn quietFinn is online now
Veteran Croc
 
Join Date: Feb 2005
Posts: 3,549
Default Re: Advertise on customer accounts

As the error says:

Quote:
Warning: Unknown(): open_basedir restriction in effect. File(/home/lnorman/xplicit/footer.html) is not within the allowed path(s): (/home/xplicit:/usr/lib/php:/usr/local/lib/php:/tmp) in Unknown on line 0
you are trying to use file in path /home/lnorman/xplicit/ when open_basedir restricts the paths you could use to: /home/xplicit or /usr/lib/php or /usr/local/lib/php or /tmp
(notice that you can use any directory below those, i.e. /home/xplicit/public_html would work).
__________________
quietFinn - netFinn Finland
"Be who you are and say what you feel because those who mind don't matter and those who matter don't mind." - Dr. Seuss
Reply With Quote
  #8  
Old 05-17-2006, 07:52 PM
XpLiCiT XpLiCiT is offline
Hatchling Croc
 
Join Date: May 2006
Posts: 7
Default Re: Advertise on customer accounts

yea but i still get the errors lol

Quote:
Warning: Unknown(.:/usr/lib/php:/usr/local/lib/phpfooter.html): failed to open stream: No such file or directory in Unknown on line 0

Warning: Unknown(.:/usr/lib/php:/usr/local/lib/phpfooter.html): failed to open stream: No such file or directory in Unknown on line 0

Warning: Unknown(.:/usr/lib/php:/usr/local/lib/phpfooter.html): failed to open stream: No such file or directory in Unknown on line 0

Warning: (null)(): Failed opening '.:/usr/lib/php:/usr/local/lib/phpfooter.html' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in Unknown on line 0
Reply With Quote
  #9  
Old 05-18-2006, 05:43 AM
quietFinn's Avatar
quietFinn quietFinn is online now
Veteran Croc
 
Join Date: Feb 2005
Posts: 3,549
Default Re: Advertise on customer accounts

1.st, find out what is the www root of your site, go to cPanel and there, on the left side, you see:
Quote:
WWW directory /home/<yourusername>/public_html
in <yourusername> is your username.

2nd, put the file footer.html to the public_html directory

3rd, add this to the .htaccess
Quote:
php_value auto_append_file '/home/<yourusername>/public_html/footer.html'
again, <yourusername> is your username.
__________________
quietFinn - netFinn Finland
"Be who you are and say what you feel because those who mind don't matter and those who matter don't mind." - Dr. Seuss
Reply With Quote
  #10  
Old 05-18-2006, 09:50 AM
XpLiCiT XpLiCiT is offline
Hatchling Croc
 
Join Date: May 2006
Posts: 7
Default Re: Advertise on customer accounts

ok..

Quote:
php_value auto_append_file '/home/<username>/public_html/_vti_log/footer.html'
this works but i have to put the footer.html on the users account..
so they could just delete it

also if i stick this in the skel directory so that wen new ppl sign up they have banners, the script dosnt work cause <username> wouldnt point to there account it would point to my test account.

so id have to add every account manually.

also, and i know its dumb but if i do get this solved can u delete this topic off your forum. cause it seems to have a better google ranking than my actual site and i dont want any ppl knowing how to get rid of there banners by reading this topic.

thanks help appreciated!
Reply With Quote
  #11  
Old 05-18-2006, 10:36 AM
quietFinn's Avatar
quietFinn quietFinn is online now
Veteran Croc
 
Join Date: Feb 2005
Posts: 3,549
Default Re: Advertise on customer accounts

Quote:
Originally Posted by XpLiCiT
ok..


this works but i have to put the footer.html on the users account..
so they could just delete it
They delete the files, you delete their account
Just write to your TOS that they can't delete the files.



Quote:
Originally Posted by XpLiCiT
also, and i know its dumb but if i do get this solved can u delete this topic off your forum. cause it seems to have a better google ranking than my actual site and i dont want any ppl knowing how to get rid of there banners by reading this topic.

thanks help appreciated!
They will know what happens if they do delete the files
__________________
quietFinn - netFinn Finland
"Be who you are and say what you feel because those who mind don't matter and those who matter don't mind." - Dr. Seuss
Reply With Quote
  #12  
Old 05-18-2006, 11:41 AM
XpLiCiT XpLiCiT is offline
Hatchling Croc
 
Join Date: May 2006
Posts: 7
Default Re: Advertise on customer accounts

yea but they can always just edit the footer to ad there own google banner instead

i guess i could setup a cron job to check it
but i dont wanna be adding these banners in manually anyway
Reply With Quote
  #13  
Old 05-18-2006, 12:29 PM
Serra's Avatar
Serra Serra is offline
Veteran Croc
 
Join Date: Feb 2005
Location: Orange Park, FL
Posts: 5,073
Default Re: Advertise on customer accounts

Quote:
Originally Posted by XpLiCiT
yea but they can always just edit the footer to ad there own google banner instead

i guess i could setup a cron job to check it
but i dont wanna be adding these banners in manually anyway
Can't you just add this to an .htaccess file above the root and then store the footer on another site URL where they can't edit it?

I do this all of the time, load PHP code from another site.

PHP Code:
include("http://mysite.com/footer.php"
__________________
Six stages of Dedi Ownership

Fashionable broken link
image included
Reply With Quote
  #14  
Old 09-28-2006, 10:30 PM
freeman's Avatar
freeman freeman is offline
Swamp Croc
 
Join Date: Jan 2006
Location: Montreal, QC, Canada
Posts: 305
Default Re: Advertise on customer accounts

Quote:
Originally Posted by XpLiCiT View Post
yea but they can always just edit the footer to ad there own google banner instead

i guess i could setup a cron job to check it
but i dont wanna be adding these banners in manually anyway
Or you can use mod layout http://tangent.org/index.pl?lastnode_id=478&node_id=362

I used this and tested with more than 5000 users (free webhosting)...

This insert header and footer on every page opened by apache and you can configure by directory....

OOpppsss if you are on dedicated !!!!
Reply With Quote
  #15  
Old 09-28-2006, 11:31 PM
Dwight Dwight is offline
Swamp Croc
 
Join Date: Apr 2005
Posts: 344
Default Re: Advertise on customer accounts

Quote:
Originally Posted by XpLiCiT View Post
i already have the reseller account but i was wondering if i can put ads on customers accounts, and how exactly would i do that
http://www.superhomepagespro.com/index.htm

A long time ago I was exploring the same idea... above is the link to one of the solutions I looked at... I did NOT try this out or use it, so it's not a recomendation... I found others as well, but this is the one I can remember... hope that helps
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT -5. The time now is 03:58 PM.