Check if page is embeded

The server doesn’t know what the client is doing with the output and as such, you’re limited in what you can assume. You may or may not have params sent in the request, referer, current uri and headers.

  • $_REQUEST['embed_act']
  • $_SERVER['HTTP_REFERER']
  • $_SERVER['REQUEST_URI']
  • get_headers()

On the JS side, it might be possible.

if(self==top)
{
    //...
}

if( parent==top )
{
    //...
}