Iframe being used to display my content

Discussion in 'HTML & Website Design' started by egdcltd, Jul 29, 2005.

  1. #1
    I've just discovered someone is using iframe to put part of my site onto theirs. Is their any way of stopping them from doing this, as I do not think I am getting any benefit from it, just lost bandwidth?
     
    egdcltd, Jul 29, 2005 IP
  2. just-4-teens

    just-4-teens Peon

    Messages:
    3,967
    Likes Received:
    168
    Best Answers:
    0
    Trophy Points:
    0
    #2
    this happened to me once before, what i did was rename the page they are framing, and then on the page they are framing put a link to my site and put adsense code in.
     
    just-4-teens, Jul 29, 2005 IP
  3. ResaleBroker

    ResaleBroker Active Member

    Messages:
    1,665
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    90
    #3
    ResaleBroker, Jul 29, 2005 IP
  4. cashmirrors

    cashmirrors Well-Known Member

    Messages:
    214
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    146
    #4
    ^ good resource
     
    cashmirrors, Jul 31, 2005 IP
  5. kjewat

    kjewat Active Member

    Messages:
    149
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #5
    You may also check the referrer, and if the referer is the page that loads your page in a frame, serve something else.... like an ad :p :p
     
    kjewat, Jul 31, 2005 IP
  6. egdcltd

    egdcltd Peon

    Messages:
    691
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thanks for the advice. kjewat, I think I understand what you are getting it, but I don't know how to do it.

    I'd rather not rename the page if possible; there are a number of links out there to it, and I'm not sure I know them all.
     
    egdcltd, Aug 1, 2005 IP
  7. kjewat

    kjewat Active Member

    Messages:
    149
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #7
    if your webserver supports php (it most likely does) you can do something like this:

    
    <?php
    
    if(strstr($_SERVER['HTTP_REFERER'],"pagethatframesyou.com")){
       //print any code you want here... 
       echo '<a href="click url" target="_top"><img src="image url"></a>';
       exit;
    }
    ?>
    
    PHP:

    If you would rather just break the frame, take a look at this page

    If you go for the frame breaker you will probably "steal" the visitor of the page that is displaying the frame ;)
     
    kjewat, Aug 2, 2005 IP