How can I prevent page opening on an iframe using PHP? Like Gmail inside an iframe?
You can do that with JavaScript
if( (self.parent && !(self.parent===self)) &&(self.parent.frames.length!=0)){ self.parent.location=document.location }
This will redirect from page that opens your page in iframe to your page.