there is a web app. It suppouse to be avilable only in specific iframe (corp. site), so uninvited guests are redirect to clients web site by script. Code below is working, but java could be disable in browser. IP white list would be a great solution, but too many dynamic IP is used.
What php trick can be used to check is site opened in iframe?
<script>
if (top === self) window.location.replace('http://uninvited-guests-go.here');
</script>
<?php header('X-Frame-Options: ALLOW-FROM https://iframe.allow.only'); ?>