Results 1 to 8 of 8

Thread: Interesting Problem

  1. #1
    Senior Member
    Join Date
    Nov 2002
    Posts
    393

    Question 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 ?

    OKay guys, see ya'll

    -invader
    \"I have a 386 Pentium.\"

  2. #2
    Senior Member
    Join Date
    Oct 2001
    Location
    Helsinki, Finland
    Posts
    570
    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.
    Q: Why do computer scientists confuse Christmas and Halloween?
    A: Because Oct 31 = Dec 25

  3. #3
    Senior Member roswell1329's Avatar
    Join Date
    Jan 2002
    Posts
    670
    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.
    /* You are not expected to understand this. */

  4. #4
    Senior Member
    Join Date
    Nov 2002
    Posts
    393
    Thank you very much guys, that helped me out.
    Even though, im trying to search for a script which can block the HTTP_refferer.

    Don't worry, i know he's such a fool he wouldnt know how to use Proxomitron.
    \"I have a 386 Pentium.\"

  5. #5
    Senior Member
    Join Date
    Oct 2001
    Location
    Helsinki, Finland
    Posts
    570
    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.

    PHP Code:
    <?php
        $wherefrom 
    $HTTP_SERVER_VARS["HTTP_REFERER"];
        print 
    "HTTP_REFERER was:".$wherefrom/* this can and should be commented out */
        
    if( $wherefrom != "www.microsoft.com" ) {
            echo 
    "

    <q>Make a fool of oneself: What a foolish thing you've done!</q> (-Winevar-virus)</p>"
    ; }
        else {
            include 
    "hiddenpage.html"; }
    ?>
    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.
    Q: Why do computer scientists confuse Christmas and Halloween?
    A: Because Oct 31 = Dec 25

  6. #6
    Senior Member
    Join Date
    Nov 2002
    Posts
    393
    ermm..what can i say, thanks again
    \"I have a 386 Pentium.\"

  7. #7
    Senior Member
    Join Date
    Oct 2001
    Location
    Helsinki, Finland
    Posts
    570
    I just found this page with a small, elegant solution that actually impressed me... It's just a tiny piece of JavaScript, found from http://www.fernsehserien.de/frameset.php?sendung=482 :
    Code:
    <script language="javascript">
    if (parent.frames.length == 0)
    location.replace("http://www.fernsehserien.de/frameset.php?sendung=482");
    </script>
    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.)
    Q: Why do computer scientists confuse Christmas and Halloween?
    A: Because Oct 31 = Dec 25

  8. #8
    Senior Member
    Join Date
    Nov 2002
    Posts
    393
    Hello ZeroOne,

    This was not for me actually. A colleague of mine.
    But anyway, im going to ask him and let ya know soon.
    Will keep this thread posted.

    Thanks
    \"I have a 386 Pentium.\"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •