Site-wise page alternation

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
xpt
Forum Newbie
Posts: 23
Joined: Tue Feb 20, 2007 1:00 pm

Site-wise page alternation

Post by xpt »

Hi,

I remember geocities.com was able to alter all web pages hosted on its site. I'm wondering if it is possible to do so under Apache.

Today, I found another site that's doing so, [Jcart: spam link removed]


I believe everything below "Send this page to a Friend" was added using some site-wise page alternation scheme. What bewilders me is that how he is able to make those adding available only to my browser to view, but not to see. I.e., I can see the effect but not able to view the source.

I hope someone here can solve the above 2 puzzles for me.

Thanks a lot
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

I remember geocities.com was able to alter all web pages hosted on its site. I'm wondering if it is possible to do so under Apache.
Yes. If you're using PHP the usual method is setting the handler for HTML to PHP, and then using auto_prepend_file, auto_append_file, and output buffering to grab the content and make modifications.
What bewilders me is that how he is able to make those adding available only to my browser to view, but not to see. I.e., I can see the effect but not able to view the source.
This is impossible, as you describe it. He is probably using JavaScript to add it.
xpt
Forum Newbie
Posts: 23
Joined: Tue Feb 20, 2007 1:00 pm

Post by xpt »

Thanks for the reply, I'll take a look at the auto_prepend_file/auto_append_file PHP solutions.

Any pure HTML solution? Back to the old geocities.com days, there didn't exist PHP by then. I guess it must be JavaScript, but how can you apply JavaScript site wise without touching each page?
He is probably using JavaScript to add it.
So I thought. He's not only very smart hiding how he add those social bookmark icons, but also very smart in hiding the JavaScripts, because I dig into each JavaScript file/function on the site, but none of then is for the adding the social bookmark link/icons.
Post Reply