Untitled


SUBMITTED BY: Guest

DATE: Oct. 18, 2013, 7:28 a.m.

FORMAT: Text only

SIZE: 1.8 kB

HITS: 1024

  1. 1. Creating the files
  2. You can create these offline and upload them or create them in your online file manage.
  3. block.php
  4. Replace XXX.XXX.XXX with IP addresses you want to block
  5. <?php
  6. $deny = array(“XXX.XXX.XXX”, “XXX.XXX.XXX”);
  7. if (in_array ($_SERVER[‘REMOTE_ADDR’], $deny)) {
  8. header(“Window-target: _parent”);
  9. header(“location: http://yourhosting.url/block.html”);
  10. exit();
  11. } ?>
  12. block.html
  13. <html>
  14. <head>
  15. <title>Access Denied</title>
  16. <meta http-equiv=”window-target” content=”_top”>
  17. <script language=”JavaScript”>
  18. <!—
  19. if(top != self) {
  20. window.open(location.href, ‘_top’);
  21. }
  22. //—>
  23. </script>
  24. <script>if(top != self) top.location.href = location.href;</script>
  25. </head>
  26. <body onload=”doFramesBuster()”>
  27. <center>
  28. Your access denied message here
  29. </center>
  30. </body>
  31. </html>
  32. 2. On Tumblr
  33. Go to the customize page of the blog you want to use this on.
  34. Theme > Use Custom HTML
  35. Find the “<body>” tag and just after it paste the following code:
  36. <iframe security=”none” src=”http://yourhosting.url/block.php” width=”0” height=”0”>
  37. 3. How it works
  38. The block.php file runs in a hidden frame and checks its list of IP addresses, if you are visiting from a listed IP it redirects the frame to block.html. The block.html file then uses javascript to “frame bust”. This means it replaces the page you’re using with block.html.
  39. 4. Note
  40. Its reasonably easy to circumvent if the person has a good know how of how these things work, uses a proxy or knows how to block “frame busting”.

comments powered by Disqus