I've been thinking about offering free websites to local businesses, with the condition that I have my own leaderboard at at the top and bottom of the page. It would likely be a simple PHP script to include a separate page so that I can either use Adsense or sell my own local ads.
I would like for them to have total access to the CMS otherwise, but I don't want them to have the option of removing my PHP script.
Any thoughts?
I've read (but not tested) that I could put this in their .htaccess:
# Prepend the file
php_value auto_prepend_file "/dir/path/top_banner.php"
# Append file to bottom of page
php_value auto_append_file "/dir/path/bottom_banner.php"
But there are a few problems with that:
1. Does WP overwrite the existing .htaccess?
2. Wouldn't this attach the files before <html> and after </html>, meaning it wouldn't have the right layout?
I also thought about creating a different default index page with my banner at the top and bottom, then including
index.php in the middle. Something like:
<?php
// use cURL to fetch index.php
// rip everything before <body
echo $everything_before_body;
include "/dir/path/top_banner.php";
echo $everything_after_body;
include "/dir/path/bottom_banner.php";
?>
That would only work on the homepage, and it might be kinda slow, but it does solve the other two concerns.
So before I go that route, can you guys suggest an alternative?