...

View Full Version : Breaking Out of iframe by ip address



embeebutterly
08-20-2011, 05:36 PM
Hi there, i really could use the help.

Ok, so (and im sure i will be told other ways) i have come up with a way of blocking people from my site even if they are currently on the site and dont reload the page.

What i was thinking of is simply:
a tiny iframe on the bottom of my page, so small it cant be seen ie 1px
that iframe goes to a page saying YOU HAVE BEEN BANNED

That page istself will be on a constant 10 seccond refresh so as soon as i add the ip address to it, BOOM, it will break out of the iframe and take the user away from the main page as display the you have been banned message.

Sound good?


ok, so here is what i have sofar but i know its wrong, dont really know how to write it correctly. The main point is:

if ip is 111.111.111 then break out of iframe

else

do nothing.


Thanks for the help.


<script language="JavaScript">
VIH_ForeColor = "navy";
VIH_FontPix = "16";
VIH_DisplayFormat = "%%IP%%";
VIH_DisplayOnPage = "no";
</script>
<script language="JavaScript" src="http://scripts.hashemian.com/js/visitorIPHOST.js.php"></script>

<script language="JavaScript" src="http://scripts.hashemian.com/js/visitorIPHOST.js.php"></script>
<script>
if (VIH_HostIP == "111.111.111.111")

document.write('if (top.location!= self.location) {
top.location = self.location.href
}' );
}else{
document.write('');
;}
</script>

tangoforce
08-20-2011, 06:23 PM
Try posting that in the HTML or JAVASCRIPT forum!

embeebutterly
08-20-2011, 06:30 PM
Try posting that in the HTML or JAVASCRIPT forum!


My bad, sorry! Can i remove it from here or shall i just leave it?

tangoforce
08-20-2011, 07:07 PM
Click the edit button and then on the edit form hit delete.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum