#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Location
    Netherlands
    Posts
    32
    Rep Power
    15
    Is there a PHP-way to avoid being framed by others. These people load my pages in their frames and make it appear as if it is their content.

    Richard Vos
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 1999
    Posts
    114
    Rep Power
    16
    There's a JavaScript way:

    self.top = self;
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Location
    Netherlands
    Posts
    32
    Rep Power
    15
    Yes, I know. But I would like to handle browserwindows with PHP. So that the pages are parsed rather than compiled. (Furthermore there are still ppl who do not use JS)

    R.
  6. #4
  7. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    18
    You can't control browsers with a server side scripting language. IOW, no, you can't do that with PHP.

    However, one thing you could try is checking the HTTP_REFERER and if it isn't from your domain, send a meta refresh to the browser with a target of top. That would run anytime someone links from outside your domain (or types in your domain directly). Just put a 1 second cycle on it so it doesn't take too long.

    NOTE: I've never done the above so I make no guarantees ;-) Just an idea that popped in my head
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    5
    Rep Power
    0
    This would work. It's how a lot of people used to handle it and also how a lot of sites stop linking to their images. I suppose the easiest thing is to write the function then do an include in the pages you want to protect like this.
  10. #6
  11. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    Try mod_block at http://www.apacheweek.com/features/modulesoup
    It's alot faster.
  12. #7
  13. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    5
    Rep Power
    0
    Depends if your webserver is Apache OR if you actually have the ability to have things installed for you.
  14. #8
  15. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Location
    thane
    Posts
    50
    Rep Power
    0
    or u can set redirection rules on ur server itself...in httpd.conf --(if apache)

    these rules can b used to allow linking or accessing to your pages only from your site
    blocking rest of the other sites accession ur pages ..
    example --

    ##### Begin Original
    <VirtualHost xxx.xxx.xxx.xxx>
    ServerAdmin webmaster@xyz.com
    CustomLog logs/xyz-access-log combined
    ServerName xyz.com
    ServerAlias xyz.com *.xyz.com
    DocumentRoot /home/htdocs/xyz
    RewriteEngine On
    RewriteCond %{HTTP_REFERER} !=^xyz.com [NC]
    RewriteCond %{HTTP_REFERER} !=^www.xyz.com [NC]
    RewriteRule ^/search http://www.xyz.com/index.html [R,L]
    </VirtualHost>
    ##### End Original


    this lines will redirect the requests from any other sites to index.html

Similar Threads

  1. avoid resize
    By jborges in forum Flash Help
    Replies: 3
    Last Post: February 17th, 2004, 01:22 PM
  2. avoid repost on refresh
    By torsten in forum PHP Development
    Replies: 1
    Last Post: January 21st, 2004, 07:02 PM
  3. How to avoid having to refresh my Database connection every Time.
    By Anibal Hernande in forum Visual Basic Programming
    Replies: 0
    Last Post: July 23rd, 2003, 11:08 AM
  4. how to avoid image is resized by the user
    By entropia in forum PHP Development
    Replies: 7
    Last Post: July 6th, 2003, 04:24 AM
  5. how to avoid people downloading many sessions?
    By pentium5 in forum Apache Development
    Replies: 6
    Last Post: October 23rd, 2002, 08:22 AM

IMN logo majestic logo threadwatch logo seochat tools logo