break a time, with break the c0de…

No iframe my page !


berikut adalah cara untuk menghindari halaman kita di iframe oleh orang lain…
seperti yang digunakan oleh twitter ;)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head><title>test. no iframe-ing this page</test> </head>

<body bgcolor="blue">

<script type="text/javascript">
//<![CDATA[
if (window.top !== window.self) {
        document.write = "";window.top.location = window.self.location; 
        setTimeout(function(){document.body.innerHTML='';},1);
        window.self.onload=function(evt){document.body.innerHTML='';};
        }
//]]>
</script>

<h1>this is BLUE<br> <? echo $_SERVER["PHP_SELF"] ?> </H1>

</body>
</html>
Advertisements

5 responses

  1. Nice share Bro… Tak kopas yah ke blog ane :D Sekalian dipasang :p

    March 12, 2010 at 5:08 pm

  2. Mantep nih bro biar gak bikin bandwidth bocor :D

    April 2, 2010 at 7:16 pm

  3. atamier

    Saya mo post google doc di wordpress, gimana yak caranya…
    disana ada

    April 20, 2010 at 6:35 am

  4. mantab brade …mantab..

    July 12, 2010 at 6:29 am

  5. Kalau saya malah ingin menawarkan jasa iframe halaman anda di rumah saya, trafict harian 15.000/hari bagi yang minat bisa liat2 di blog saya, klik aja deh nama saya.

    September 15, 2011 at 3:16 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s