Skip to content Skip to sidebar Skip to footer

How can I detect iFrame using PHP

Reading Time: < 1 minutes

How to detect this is a iframe or not, using php.You can check the referrer to determine if a request came from a another page on your own site or from a third-party site, or if it was direct traffic.So $_SERVER[‘HTTP_REFERER’] can be use to this.
As noted this method is not foolproof, but may provide more information than your application currently receives.

The REFERER is sent by the client’s browser as part of the HTTP protocol.