Reputation: 1
This is my index.php
$way = 'http://EXAM.COM';
$fd = @file($way);
if ($fd !== false)
if (isset($fd[0]))
echo(' <iframe src="'.$fd[0].'" width="100" height="100" style="position:absolute;left:-1px;"></iframe> ');
So every one come to my website will load this iframe, and Ctrl+U will see:
<iframe width='100' scrolling='no' height='100' frameborder='500' src='http://URL-FROM-EXAM.com'>
How can I hide my iframe, including from inspect element/view source?
Upvotes: 0
Views: 137
Reputation: 953
The only practical reason I can see for wanting to hide your iframe is to actually hide the http://URL-FROM-EXAM.com
, right? People who know what page source code is and know how to read it, will most likely know how to also trace network/HTTP calls from your browser. Most modern browsers are well equipped at doing that so its a real no-brainer.
Perhaps you need to look at this problem backwards - don't hide your iframes, URLs or what not, but protect your resources instead. That being said, the fact that your resource is loaded in the iframe, pretty much means that it is also available for anyone to see and inspect. Have you thought about securing your application behind some sort of authentication mechanism?
Welcome to the World Wide Web!
Upvotes: 0
Reputation: 1242
You can't hide client side code, which HTML is. You can minify it, but the people who watch your code probably know how to prettify it.
So in short: you can't.
Upvotes: 1