VsUK
05-04-2011, 10:35 AM
Hi, im having a problem adding a frame busting killer that counteracts a frame killer script on sites so i can load them inside my iframes..
here is the code i use
<?php
$result = mysql_query("SELECT ru.id, ru.username, ru.owid FROM raidbar_users ru LEFT JOIN raidbar_groups rg ON ru.groupid = rg.id WHERE rg.id = '".(int)$_REQUEST['group']."'") or die(mysql_error());
$myRaidid = raidid();
if(isset($_GET['gm']))
{
echo '<FRAMESET rows="*,*,*,30" frameborder="0">' . "\n";
echo ' <FRAMESET cols="*,*" frameborder="0" scrolling="no">' . "\n";
$i = 0;
while($row = mysql_fetch_array($result))
{
if ($i == 2)
{
echo ' </FRAMESET>' . "\n";
echo ' <FRAMESET cols="*,*" frameborder="0" scrolling="no">' . "\n";
$i = 0;
}
echo ' <FRAME src="http://'.$server[$siteConfig['userServer']].'.outwar.com/joinraid.php?raidid=' . $myRaidid . '&suid=' . $row['owid'] . '&serverid='.$siteConfig['userServer'].'">' . "\n";
$i++;
}
echo ' <FRAME src="">' . "\n";
echo ' </FRAMESET>' . "\n";
echo ' <FRAMESET frameborder="0" scrolling="no">' . "\n";
echo ' <FRAME src="http://'.$server[$siteConfig['userServer']].'.outwar.com/raidmembers.php?raidid=' . $myRaidid . '">' . "\n";
echo ' </FRAMESET>' . "\n";
echo '</FRAMESET>' . "\n";
}
else
{
echo '<table cellspacing=1 cellpadding=1>' . "\n";
echo '<tr>' . "\n";
$i = 0;
while($row = mysql_fetch_array($result))
{
if ($i == 2)
{
echo '</tr>' . "\n";
echo '<tr>' . "\n";
$i = 0;
}
echo ' <td><iframe src="./acct.php?suid=' . $row['owid'] . '" width=450 height=225 scrolling=no frameborder=0></iframe>' . "\n";
$i++;
}
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo ' <td><iframe src=http://'.$server[$siteConfig['userServer']].'.outwar.com/raidmembers.php?raidid=' . raidid() . '&serverid='.$siteConfig['userServer'].' width=250 height=30 scrolling=no></iframe>' . "\n";
echo '</tr>' . "\n";
echo '</table>' . "\n";
}
?>
Now im told to use the following..
<script type="text/javascript">
var prevent_bust = 0
window.onbeforeunload = function() { prevent_bust++ }
setInterval(function() {
if (prevent_bust > 0) {
prevent_bust -= 2
window.top.location = 'http://server-which-responds-with-204.com'
}
}, 1)
</script>
or
var prevent_bust = 0;
// Event handler to catch execution of the busting script.
window.onbeforeunload = function() { prevent_bust++ };
// Continuously monitor whether busting script has fired.
setInterval(function() {
if (prevent_bust > 0) { // Yes: it has fired.
prevent_bust -= 2; // Avoid further action.
// Get a 'No Content' status which keeps us on the same page.
window.top.location = 'http://server-which-responds-with-204.com';
}
}, 1);
But the window.top.location i dont know how to incorporate that to work.
Can anyone help?
here is the code i use
<?php
$result = mysql_query("SELECT ru.id, ru.username, ru.owid FROM raidbar_users ru LEFT JOIN raidbar_groups rg ON ru.groupid = rg.id WHERE rg.id = '".(int)$_REQUEST['group']."'") or die(mysql_error());
$myRaidid = raidid();
if(isset($_GET['gm']))
{
echo '<FRAMESET rows="*,*,*,30" frameborder="0">' . "\n";
echo ' <FRAMESET cols="*,*" frameborder="0" scrolling="no">' . "\n";
$i = 0;
while($row = mysql_fetch_array($result))
{
if ($i == 2)
{
echo ' </FRAMESET>' . "\n";
echo ' <FRAMESET cols="*,*" frameborder="0" scrolling="no">' . "\n";
$i = 0;
}
echo ' <FRAME src="http://'.$server[$siteConfig['userServer']].'.outwar.com/joinraid.php?raidid=' . $myRaidid . '&suid=' . $row['owid'] . '&serverid='.$siteConfig['userServer'].'">' . "\n";
$i++;
}
echo ' <FRAME src="">' . "\n";
echo ' </FRAMESET>' . "\n";
echo ' <FRAMESET frameborder="0" scrolling="no">' . "\n";
echo ' <FRAME src="http://'.$server[$siteConfig['userServer']].'.outwar.com/raidmembers.php?raidid=' . $myRaidid . '">' . "\n";
echo ' </FRAMESET>' . "\n";
echo '</FRAMESET>' . "\n";
}
else
{
echo '<table cellspacing=1 cellpadding=1>' . "\n";
echo '<tr>' . "\n";
$i = 0;
while($row = mysql_fetch_array($result))
{
if ($i == 2)
{
echo '</tr>' . "\n";
echo '<tr>' . "\n";
$i = 0;
}
echo ' <td><iframe src="./acct.php?suid=' . $row['owid'] . '" width=450 height=225 scrolling=no frameborder=0></iframe>' . "\n";
$i++;
}
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo ' <td><iframe src=http://'.$server[$siteConfig['userServer']].'.outwar.com/raidmembers.php?raidid=' . raidid() . '&serverid='.$siteConfig['userServer'].' width=250 height=30 scrolling=no></iframe>' . "\n";
echo '</tr>' . "\n";
echo '</table>' . "\n";
}
?>
Now im told to use the following..
<script type="text/javascript">
var prevent_bust = 0
window.onbeforeunload = function() { prevent_bust++ }
setInterval(function() {
if (prevent_bust > 0) {
prevent_bust -= 2
window.top.location = 'http://server-which-responds-with-204.com'
}
}, 1)
</script>
or
var prevent_bust = 0;
// Event handler to catch execution of the busting script.
window.onbeforeunload = function() { prevent_bust++ };
// Continuously monitor whether busting script has fired.
setInterval(function() {
if (prevent_bust > 0) { // Yes: it has fired.
prevent_bust -= 2; // Avoid further action.
// Get a 'No Content' status which keeps us on the same page.
window.top.location = 'http://server-which-responds-with-204.com';
}
}, 1);
But the window.top.location i dont know how to incorporate that to work.
Can anyone help?