Trying to reverse engineer a couple of land pages I came across. I've seen this used a few times on different pages, this is how the code looks like:
index.php:
proxy.php:
redir.php:
index.php:
Code:
<body bgcolor="#666666" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="gotoOffset()">
<h1 align="center"></h1>
<p align="center"><iframe id="proxy" name="proxy" width="895" height="409" frameborder="0" src="proxy.php?u=bWFpbi5waHA=&s=14" scrolling="no"></iframe></p>
<script type="text/javascript">
function fullpageFrame()
{
var proxy = document.getElementById('proxy');
proxy.width = '100%';
proxy.height = '100%';
proxy.style.position = 'absolute';
proxy.style.left = '0px';
proxy.style.top = '0px';
window.frames[0].resizeRedirFrame();
return false;
}
function gotoOffset()
{
window.proxy.scroll(75, 75);
}
</script>
</body>
Code:
<body marginheight="0" marginwidth="0" onload="startWatcher()">
<iframe id="redir" name="redir" src="redir.php?u=bWFpbi5waHA=" width="1024" height="768" frameborder="0"></iframe>
<script type="text/javascript">
function resizeRedirFrame()
{
var redir = document.getElementById('redir');
redir.width = '100%';
redir.height = '100%';
redir.style.position = 'absolute';
redir.style.left = '0px';
redir.style.top = '0px';
}
var timer;
var jumps = 14;
if(navigator.userAgent.indexOf('MSIE') != -1)
jumps += 4;
function watcher()
{
if(window.history.length > jumps)
{
// On second page, resize the frame
window.parent.fullpageFrame();
window.clearInterval(timer);
}
}
function startWatcher()
{
timer = window.setInterval('watcher()', 50);
// !!! Uncomment the following line to find out how many jumps to configure !!!
//alert('Starting jumps: ' + window.history.length);
}
</script>
Code:
<body>
<script type="text/javascript">
function cloakIt()
{
window.location = 'main.php';
}
cloakIt();
</script>
</body>
</body>