Text Based Ads on static page

zijo1

New Member
Messages
1
Reaction score
0
Points
0
Is it somehow possible to put Text Based Ads on every .html page using some .php script.
I have around 1000 .html pages and it's a big job to put Add on every page.

I have tried this bat without success.

1. I have created .htaccess file and put in it next lines:
AddHandler headered .htm
AddHandler headered .html
Action headered header.php

2. I have uploaded files header.html and footer.html with Text Based Ads code

3. I have uploaded header.php file
code:
<?php
$header = "header.html";
$footer = "footer.html";

$file = $_SERVER["SCRIPT_FILENAME"];
readfile($header);
readfile($file);
readfile($footer);
?>

Now I'm getting error:
Bad Request

Your browser sent a request that this server could not understand. Invalid URI in request GET / HTTP/1.1

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.



Any help?
 
Last edited:

Archkronos

New Member
Messages
257
Reaction score
0
Points
0
As much as I hate them, you might want to use something like a frameset.
 

Slothie

New Member
Messages
1,429
Reaction score
0
Points
0
Or just a regular expression capable editor (like PowerGrep for windows or plain old sed) to replace all the tiles :)
 

jensen

Active Member
Messages
1,168
Reaction score
22
Points
38
wow you've 1000 pages already and each are static pages? You could use some CMS to manage them. How do you keep the menu's updated each time you add more stuff?
 

Coonz

New Member
Messages
132
Reaction score
1
Points
0
Just use include
PHP:
<?php
include("header.html");
?>
 

jensen

Active Member
Messages
1,168
Reaction score
22
Points
38
It's not about static plan. It's about a static page.

The php code for include still require one to put that code on 1000 pages.

The iframes or frameset might be a simple way to get the ads up on every page. Some hosting servers add the adds automatically to every page.
 
Top