Results 1 to 5 of 5

Thread: help needed

  1. #1
    Join Date
    Sep 2005
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default help needed

    im trying to make a script for my site that will detect that the page contents are on the page that they are supposed to be on, and redirect to a different page if they are not, simply for the purpose that my site is run on more javascript than html so that if they disable javascript they will see nothing, and the javascript that i intend on using will be added externally, with cache'ing of the page's contents off (got that part down...) and right-click disabled (yes, i take source theives seriously), and the script will be disguised to look like an important script that will be needed for another function on the page so that it fools theives and the page that they will be redirected to will have a tracker on it so that i may easily catch them and find the url of the site that is stealing source. anyways heres the code:
    Code:
    var n="document.self.location"
    var good=(n=="http://pageurlhere")
    var bad=(n=="http://*.*.*/*/*")
    if (good)
    location="http://urlhere/frameleft4.html"
    else if (bad)
    location="http://urlhere/caughtya.htm"
    can anyone tell me what im doing wrong and what i can do to fix this so that it works?

  2. #2
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Josh_R
    im trying to make a script for my site that will detect that the page contents are on the page that they are supposed to be on
    Why would they be anywhere else?

    simply for the purpose that my site is run on more javascript than html
    It shouldn't be. Correct that mistake before you consider doing anything else.

    so that if they disable javascript they will see nothing
    Is that supposed to be a good thing? Rejecting users and search engines is rarely ever considered wise.

    with cache'ing of the page's contents off
    So, you want to add to world-wide network usage on a whim, or do you actually have a reason?

    and right-click disabled (yes, i take source theives seriously)
    No you don't. If you did, you'd realise that there's nothing you can do to stop code and content from being stolen. Anyway, from the impression I have so far, there's nothing worth taking.

    Mike

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    can anyone tell me what im doing wrong
    More or less everything, by the sound of this. You cannot stop people seeing your source, and you shouldn't try. Caching exists for a reason; don't disable it unless it would be useless in that situation. A site should never rely on Javascript.
    Quote Originally Posted by Mike
    So, you want to add to world-wide network usage on a whim, or do you actually have a reason?
    I'm guessing this is another attempt to stop the dreaded "source theives."
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #4
    Join Date
    Sep 2005
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by mwinter
    Why would they be anywhere else?
    because i have dealt with source theives before... and they would literally take the whole page and put it somewhere else... so i want a javascript implemented in the page that would check the url and if the url of the page doesnt match the one in the script i would want it to direct that stolen page elsewhere.

  5. #5
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Hypothetically, saying I (for some reason) copy-pasted your entire page into one of my own. How would this harm you or your business?
    Have you tried simply putting a copyright statement on your page? I doubt if your source code contains national secrets or even anything worth studying for educational purposes, but a simple copyright statement will protect you from "source theives" if you can prove that someone else using your code works somehow to your or your client's detriment.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

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