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.
Reading Time: < 1 minute