SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: Anti-Killframe

  1. #1
    SitePoint Member
    Join Date
    Apr 2002
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Anti-Killframe

    I'm building a website for a client who operates one of those free url redirection services. You sign up for an account and in return you get a web address like

    http://yourname.shortdomain.com

    instead of this:

    http://www.provider.name.com/~username/subdirectory/page.html

    The catch, of course, is that they wrap your page in a frameset and show some obnoxious banner ads alongside your page.

    My problem is this: my client keeps asking me to insert "Anti-killframe" code into the pages to keep his users from using a killframe script to break out of the frameset and thus avoid the banner ads.

    Now, a killframe script is pretty easy - something along the lines of :

    [VBS]if (window != window.top) top.location.href = location.href;[/VBS]

    but an ANTI-KILLFRAME???

    I've never heard of this, can't find anything searching around the net, and can't even think of how to implement something like that.

    To tell the truth, I don't believe that it's possible, but the client insists that he's seen it before (where? is the question I keep asking him).

    Can anyone help get this guy off my back by giving a definite answer either way?

    Cheers!

  2. #2
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try searching and replacing

    Code:
    If (window != window.top) top.location.href = location.href;
    that code

    var orig_string = new String ('orig');
    var find_string = new String ('find');
    var rplc_string = new String ('replace');
    var rest_string = stringReplace (orig,find_string,rplc_string)

    try that

  3. #3
    SitePoint Member
    Join Date
    Apr 2002
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The problem is that the client doesn't offer hosting services, only the redirect. All user pages are located on different servers, and so it's not like I can scour the user pages looking for specific killframe code and remove it.

    The idea is to load two pages into a frameset, the user's actual homepage, and the client's banner page.

    I need to stop the user's page from breaking out of the frameset.

  4. #4
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thats what i mean, you can search from your frame by just inserting

    parent.the_users_frame.document.write etc

    have a look at this

    http://www.9cy.com/members2/thesphin...mes/frame.html


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
  •