How can I allow my PHP file to only load in an iframe?
For example:
Prevent direct access:
example.com/Loader.php
Allow iframe access:
<iframe name="TEST" src="Example.com/Loader.php"></iframe>
How can I allow my PHP file to only load in an iframe?
For example:
Prevent direct access:
example.com/Loader.php
Allow iframe access:
<iframe name="TEST" src="Example.com/Loader.php"></iframe>
You can use JavaScript for that
if(window==window.top) {
// not in an iframe
}