Page 1 of 1
Server Parased Include
Posted: Mon Sep 04, 2006 8:05 am
by tecktalkcm0391
Is there anyway that I could make something to upload to a server that would go on every page and add some HTML right before the </body> tag. (Without Using any PHP)
Posted: Mon Sep 04, 2006 9:14 am
by Ambush Commander
Well, server side includes usually entail renaming the file .shtml. If file extensions / user permissions to execute PHP are what you're worried about, you could always setup mod_rewrite to redirect all requests to a PHP file that would retrieve the static file and add the PHP tag.
Re: Server Parased Include
Posted: Mon Sep 04, 2006 11:39 am
by RobertGonzalez
tecktalkcm0391 wrote:Is there anyway that I could make something to upload to a server that would go on every page and add some HTML right before the </body> tag. (Without Using any PHP)
You are trying to do this dynamically, I presume?
Posted: Wed Sep 06, 2006 3:41 pm
by tecktalkcm0391
Yeah, Like if you get a free account on 150m.com you get adds added to your page automatically right after the <body> tag
Posted: Wed Sep 06, 2006 5:36 pm
by Ambush Commander
Yeah, I think mod_rewrite is the way to go.
Posted: Sat Sep 09, 2006 1:13 pm
by tecktalkcm0391
Can someone please tell me how to do that, cause I get so lost with mod_rewrite... does anyone know of a "Mod_Rewrite for Dummies" site?...lol
Posted: Sat Sep 09, 2006 3:51 pm
by Ambush Commander
I'm sure a Google would lead you to the resource you desire.
http://www.google.com/search?q=mod%20rewrite
Posted: Sat Sep 09, 2006 11:46 pm
by tecktalkcm0391
Google. Its not helping at this moment. Anybody?
Posted: Sun Sep 10, 2006 2:12 am
by n00b Saibot
Re: Server Parased Include
Posted: Sun Sep 10, 2006 9:42 am
by RobertGonzalez
tecktalkcm0391 wrote:Is there anyway that I could make something to upload to a server that would go on every page and add some HTML right before the </body> tag. (Without Using any PHP)
Ok, let me wrap my mind around this. You want to take an HTML page that is on the server, open it and add some code just before the </body> tag, and you want to do it without using PHP? How about Perl? What are you trying to accomplish with this and why? That might help us better help you.
Posted: Sun Sep 10, 2006 9:57 am
by jayshields
He is wanting to have every webpage on his server have some extra HTML code in it in a specific place. The extra HTML code and specific place will be the same across all files.
The files will not be modified, but the HTML will be modified on the fly when the user is viewing a webpage.
If a HTML file on the server contained this:
Code: Select all
<html>
<head><title>something</title></head>
<body>something</body>
</html>
When viewed it would look like this:
Code: Select all
<html>
<head><title>something</title></head>
<body>something{WHATEVER EXTRA STUFF HERE}</body>
</html>
Posted: Sun Sep 10, 2006 4:01 pm
by feyd
There's always
auto_prepend_file and its sibling.