How do I prevent others from iframing my content?

Discussion in 'HTML & Website Design' started by karan265, Jul 16, 2007.

  1. #1
    I have a site whose content keeps getting iframed on a daily basis.

    Daily I change the content, daily other sites use my precious bandwidth though iframing the content.

    And its not even a 2KB image, its a download script through which people download 100s of MB's, I don't want him to take advantage of my bandwidth. :(

    Is there a technique from which I can stop him from stealing my content?

    Thanks,
    Karan
     
    karan265, Jul 16, 2007 IP
  2. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
  3. karan265

    karan265 Active Member

    Messages:
    1,691
    Likes Received:
    47
    Best Answers:
    0
    Trophy Points:
    90
    #3
    The problem is that I myself am using an iFrame to display that page on one of my other pages and I can't possibly take do that ^^ because it will remove that file from my file too. :(
     
    karan265, Jul 16, 2007 IP
  4. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Why not just alter the way you display the page on your other pages? Use a server side include.
     
    mad4, Jul 16, 2007 IP
  5. ambsmart

    ambsmart Guest

    Messages:
    70
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    If your site using server side scripting like PHP just use the include function. Better than iframe.
     
    ambsmart, Jul 16, 2007 IP
  6. karan265

    karan265 Active Member

    Messages:
    1,691
    Likes Received:
    47
    Best Answers:
    0
    Trophy Points:
    90
    #6
    If I were to use the include function. The whole of the php file would be included resulting in the <html><head> etc tags to be included in the main page which would result in half of the page not showing up. :(
     
    karan265, Jul 16, 2007 IP
  7. sakib000

    sakib000 Active Member

    Messages:
    415
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    58
    #7
    no it will not happen
     
    sakib000, Jul 16, 2007 IP
  8. PHPGator

    PHPGator Banned

    Messages:
    4,437
    Likes Received:
    133
    Best Answers:
    0
    Trophy Points:
    260
    #8
    How about removing the excess tags to avoid errors?
     
    PHPGator, Jul 16, 2007 IP
  9. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Or just create a second version of the page for use with an include.
     
    mad4, Jul 17, 2007 IP
  10. jawanda

    jawanda Peon

    Messages:
    151
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #10
    bingo.

    OR, another option that may or may not solve the problem: deny visitors based on referrer. Here's a good article on the subject: http://www.htaccess-guide.com/index.php?a=7

    -P
     
    jawanda, Jul 17, 2007 IP
  11. mikeloring

    mikeloring Guest

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    use a generic php session maybe? that way when there hot linking your iframe, if there not part of your web sites session, the page will point elsewhere?

    my 2 cents =P
     
    mikeloring, Jul 17, 2007 IP