If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Interesting Problem

Alright then,

I made this page, say http://www.xyz.com
The index.html has content which links to the other pages of the website.
Some fool copies and pastes the code with his name on the copyright, even though i have made just a fake copyright. He puts his name on the page instead of mine and the rest of the links on the index.html direct to the pages on my servers.
The solution you'd probably be thinking would to link back to the index.html of my website through the other pages, and writing my name on each one of them, but that's not the deal im looking for. Is there a way to stop such blatant copying and fooling around ?
In short, is there a way to give him back what he has been bargaining for ?

You could use PHP to check the http_referer. If the referer is from that ***'s page, you wouldn't display the original content. That fools most people, even though it's easy to fake the referer like with Proxomitron.

That would be easily done with INCLUDEing a piece of code to every page. The same code could also contain your name and the copyright information. In my homepages I have the menu and the meta-tags (with some custom php-functions) coming from an external file. If you have a menu bar there, include a link to your copyright information.

Protecting just images is easy with the .htaccess -file, Google for it.

Also contact the one who is copying your work and if he doesn't reply, contact his ISP.

Ooh! Good answer ZeroOne. PHP is a great way of protecting what's yours, because you can have the PHP do anything you want before the headers are passed to the browser, and all that the end user will see is the resultant HTML.

Unfortunately, the resultant HTML is all you really need to create a page that looks exactly like the one you're trying to protect, and not many people read source code to find out who really wrote the page.

Hmm...You could control your entire site through a CGI script. You could have every link point back to the CGI and have the CGI dynamically render each page. But even then, every page would have the resultant HTML that gets sent to the browser.

There really isn't a way to stop someone doing what you mentioned. Therein lies the dilemma of the web. Everything must be shared -- copyrighted or not. Anyone can copy your index page and pass your site off as theirs, and most people would buy it because they're not looking for copyrights. However using the PHP or CGI method to assign a copyright on the bottom of every page could definitely help you if you wanted to take the joker to court for copyright infringement.

I'd like to point out that I posted this thread about www.Anti-Leech.com a while back under the subject "Pop-up blocking = thievery?". Pop-up blocker blockers isn't the only thing they offer, they have also got a html-source code protector script. I tested it briefly, and I'm fairly sure it blocks 99% of surfers from seeing your source. I would have to install it myself to better figure out how it works, because in 10 minutes I didn't manage to get the hidden code out of it... It's some sort of java script which points to a php-script at their site anyway, perhaps the pages to be hidden are also on their server.

But I made you quickly a little php-script that checks the referer and refuses to show the hidden page if it is accessed elsewhere than from microsoft.com... You could change it so that it refuses to show the page if it is accessed through one certain page, but you get the idea here. The following piece of code can be saved to a file (.php) and executed (loaded to the browser from a server that supports php) as is.

Edit/Add: You can even check if the referer contains a certain string (like "~invader/"), it is done with strpos-function which returns FALSE if the string doesn't exist there... I meant to give you a link to PHP.net. If you enter the address as "http://www.php.net/strpos", it will automatically search for strpos and forward you to the right page, http://www.php.net/manual/en/function.strpos.php in this case. Very handy, almost better than having all the helps downloaded locally! Have fun.

It checks for frames and redirects if they're not found. I babelfished that page and saved the result and was surprised when it gave me the original version when I loaded it to browser.

That of course only works in your case if your site is using frames and his not (so that he points directly at your pages) but also prevets your frames from being missed and messed by the search engines, which is good in generally for everyone who has frames. Although if you start using PHP you can give up frames.

While I'm in this thread again I'd like to hear about what solution you came up with for your problem, invader? (You could give us the address of both your page and the kiddiot's page.)