PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 2nd, 2000, 09:15 AM
Richard Vos Richard Vos is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2000
Location: Netherlands
Posts: 32 Richard Vos User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 14
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

Reply With Quote
  #2  
Old May 2nd, 2000, 10:11 AM
scollo scollo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 1999
Posts: 114 scollo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 44 sec
Reputation Power: 15
There's a JavaScript way:

self.top = self;

Reply With Quote
  #3  
Old May 2nd, 2000, 11:23 AM
Richard Vos Richard Vos is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2000
Location: Netherlands
Posts: 32 Richard Vos User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 14
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.

Reply With Quote
  #4  
Old May 3rd, 2000, 07:49 AM
rod k rod k is offline
Apprentice Deity
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jul 1999
Location: Niagara Falls (On the wrong side of the gorge)
Posts: 3,237 rod k User rank is Private First Class (20 - 50 Reputation Level)rod k User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 m 8 sec
Reputation Power: 17
Send a message via AIM to rod k
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

Reply With Quote
  #5  
Old May 4th, 2000, 05:23 AM
Atlaz Atlaz is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 5 Atlaz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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.

Reply With Quote
  #6  
Old May 4th, 2000, 05:43 AM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Try mod_block at http://www.apacheweek.com/features/modulesoup
It's alot faster.

Reply With Quote
  #7  
Old May 4th, 2000, 06:12 AM
Atlaz Atlaz is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 5 Atlaz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Depends if your webserver is Apache OR if you actually have the ability to have things installed for you.

Reply With Quote
  #8  
Old May 4th, 2000, 08:07 AM
ranjeet ranjeet is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2000
Location: thane
Posts: 50 ranjeet User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to ranjeet Send a message via Yahoo to ranjeet
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > How to avoid getting framed by others?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap