• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

Force ads on accounts automatically for FREE with cpanel ...

Do you have to be root? and can you make a script that only needs php and mysql or cgi or sumthing cause i was looking for a free script like this to incorporate my google ads
 
OH if it can be made, .. he can make it. The question is .. does he have the time or interest.


Do you have to be root? and can you make a script that only needs php and mysql or cgi or sumthing cause i was looking for a free script like this to incorporate my google ads
 
It says on the second line of my original post that you do have to be root to install scripts in postwwwacct, however if you can get your host to install the code and give them the package names you want to force ads on they should be able to setup without a problem ...

Its possible to get php to insert headers and footers on pages automatically, but actually it breaks even more sites than mod_layout does, and there are other ramifications, like the ability to serve xml, and most importantly, if you're not root the only place you have to edit the php runtime is each webroot .htaccess, which can be changed by the user, and will be, quite easily ....

I think mod_layout is the only real solution to forcing content into sites.... maybe one day I'll come up with an idea and write something, but for the moment work with what you have ....
 
Does anyone still have the zip? I downloaded it a while ago but seem to of lost it. :mad: and the op doesn't have it either.

Dan
 
I've been trying to get this script to work for the past hour, but can't seem to get it to show ads on any free accounts.

I've installed mod_layout, set up a free hosting plan, renamed postwwwacct.php to postwwwacct and everything else, but can't seem to figure out where I've gone wrong.

Here's my mod-layout.conf.php:
Code:
<?php
/**
 * /scripts/postwwwacct configuaration for mod-layout ...
 */
$config = array(
	'admine' => 'john@jshosts.com', # Administration email address, MAKE SURE YOU CAN READ THESE EMAILS
	'timestamp' => DATE_RFC822, # Date format, for most people default is good
	'httpd.conf' => '/usr/local/apache/conf/httpd.conf', # Location of httpd.conf to edit
	'plans' => array( # Array of plans you want to apply ads on
		'jslaneh_FreeHosting' # Plan one and then a comma ( if only one plan no comma needed after it's name )
	),
	'ads' => array(
		'header' => '/home/jslaneh/public_html/adsh.html', # HTML file containing the code for header ads
		'footer' => '/home/jslaneh/public_html/adsf.html' # HTML file containing the code for footer ads
	),
);
?>

I'm sure I've done everything right but as you can see ( http://free.jshosts.net/ ) it doesn't seem to show any ads.
 
I haven't received any emails and I've just double checked to make sure it's chmodded to 755 and yes it's chmodded.
 
ok then, create an account that should have the ads forced, then copy paste the right frame output of whm here .... obviously something is going on ...

alternatively if you would like me to just fix it for you ... then send me a login .... there's no need to worry about trusting me ... ---- I must have about 100 logins for people on fws ... root logins ....
 
I trust you, I'll send you a login now, easier than keep trying things myself. :p Let me know what I did wrong or what went wrong. :)
 
All fixed ...

FYI people, make sure there are no line breaks in the config file ... I suggest using winscp to browse remote filesystems over ssh, not using putty and text editors, especially as you'all prolly use windows and it sucks boobies ....
 
Back
Top