Pernahkan anda menggunakan inline frame untuk menampilkan halaman website lain? Menyenangkan bukan? Namun justru hal ini menjadi tidak menyenangkan bagi pemilik halaman website yang halamannya ditampilkan dalam frame tersebut. Bagi seorang admin yang mengerti hal ini tentunya sangat berdampak buruk, karena penggunaan frame untuk menampilkan website lain tanpa izin dari pihak terkait sama dengan pencurian data, dan tentunya dampak lainnya adalah bandwith yang tersedot pun akan semakin besar, dan yang lainnya, berdampak buruk dalam search engine, yakni black list, karena di anggap curang dalam menempuh jalan SEO.
Lalu bagaimana solusinya?
Sebetulnya hal seperti ini bisa di cegah dengan javascript sederhana.
Letakkan script di bawah ini pada setiap halaman yang ingin anda protek. Sangat mudah.
Script di atas bertugas untuk mendeteksi :
jika url halaman yang diakses bukanlah url yang sebenarnya dimana halaman tersebut berada, maka lakukan redirect ke url aslinya.
Oke, sekian. Selamat Mencoba.
File tutorial dapat di download di sini : :
http://ilmuwebsite.com/file_tutorial/inlineframe.zip
Demo ketika sebuah halaman belum di protek dengan javascript :
http://ilmuwebsite.com/file_tutorial/inlineframe/index.html
Ketika sebuah halaman sudah di protek :
http://ilmuwebsite.com/file_tutorial/inlineframe/index2.html
Tq.
Tampilkan postingan dengan label Java Script. Tampilkan semua postingan
Tampilkan postingan dengan label Java Script. Tampilkan semua postingan
2 Des 2009
3 Jul 2008
Tulisan Matrix
-------
Script ini hanya jalan di Internet Explorer
-------
contoh buka: http://www.ilmuwebsite.com/javascript/javascript-matrix.htm
<html>
<head>
</head>
<body bgcolor="#000000">
<STYLE type=text/css>#supertext {
LEFT: 0px; VISIBILITY: hidden; POSITION: absolute; TOP: 0px
}
</STYLE>
<SCRIPT language=JavaScript1.2>
//Configure the below three variables
//1) Set message to display (HTML accepted)
var thecontent='<h2><font face="Courier New" font size="5" color="#00FF00">ilmuwebsite.com - Webmaster Resource</font></h2>'
//2) Set delay after which message should be hidden, in miliseconds ('' makes it incessantly visible on the screen)
var hidetimer='';
//3) Set speed of animation (1-50), where larger is faster
var BallSpeed = 20;
///NO NEED TO EDIT BELOW THIS LINE///////////
var contentWidth;
var contentHeight;
var maxBallSpeed = 50;
var xMax;
var yMax;
var xPos = 0;
var yPos = 0;
var xDir = 'right';
var yDir = 'down';
var superballRunning = true;
var tempBallSpeed;
var currentBallSrc;
var newXDir;
var newYDir;
function initializeBall() {
if (document.all) {
xMax = document.body.clientWidth
yMax = document.body.clientHeight
document.all("supertext").style.visibility = "visible";
contentWidth=supertext.offsetWidth
contentHeight=supertext.offsetHeight
}
else if (document.layers) {
xMax = window.innerWidth;
yMax = window.innerHeight;
contentWidth=document.supertext.document.width
contentHeight=document.supertext.document.height
document.layers["supertext"].visibility = "show";
}
setTimeout('moveBall()',400);
if (hidetimer!='')
setTimeout("hidetext()",hidetimer)
}
function moveBall() {
if (superballRunning == true) {
calculatePosition();
if (document.all) {
document.all("supertext").style.left = xPos + document.body.scrollLeft;
document.all("supertext").style.top = yPos + document.body.scrollTop;
}
else if (document.layers) {
document.layers["supertext"].left = xPos + pageXOffset;
document.layers["supertext"].top = yPos + pageYOffset;
}
animatetext=setTimeout('moveBall()',20);
}
}
function calculatePosition() {
if (xDir == "right") {
if (xPos > (xMax - contentWidth - BallSpeed)) {
xDir = "left";
}
}
else if (xDir == "left") {
if (xPos < (0 + BallSpeed)) {
xDir = "right";
}
}
if (yDir == "down") {
if (yPos > (yMax - contentHeight - BallSpeed)) {
yDir = "up";
}
}
else if (yDir == "up") {
if (yPos < (0 + BallSpeed)) {
yDir = "down";
}
}
if (xDir == "right") {
xPos = xPos + BallSpeed;
}
else if (xDir == "left") {
xPos = xPos - BallSpeed;
}
else {
xPos = xPos;
}
if (yDir == "down") {
yPos = yPos + BallSpeed;
}
else if (yDir == "up") {
yPos = yPos - BallSpeed;
}
else {
yPos = yPos;
}
}
function hidetext(){
if (document.all)
supertext.style.visibility="hidden"
else if (document.layers)
document.supertext.visibility="hide"
clearTimeout(animatetext)
}
if (document.all||document.layers){
document.write('<span id="supertext"><nobr>'+thecontent+'</nobr></span>')
window.onload = initializeBall;
window.onresize = new Function("window.location.reload()");
}
</SCRIPT>
<SCRIPT language=JavaScript>
if (document.all){
Cols=22;
Cl=18; //Peþpeþe geliþ mesafeleri!
Cs=110; //Sayfaya enine yayýlýþ mesafeleri!
Ts=12; //Rakamlarýn büyüklükleri!
Tc='#00FF00';//Renk
Tc1='#00FF00';//Renk1
MnS=22; //Akýþ hýzlarý!
MxS=50; //Akýþ hýzlarý!
I=Cs;
Sp=new Array();S=new Array();Y=new Array();
C=new Array();M=new Array();B=new Array();
RC=new Array();E=new Array();Tcc=new Array(0,1,7,9,3,2);
document.write("<div id='Container' style='position:absolute;top:0;left:-"+Cs+"'>");
document.write("<div style='position:relative'>");
for(i=0; i < Cols; i++){
S[i]=I+=Cs;
document.write("<div id='A' style='position:absolute;top:0;font-family:Arial;font-size:"
+Ts+"px;left:"+S[i]+";width:"+Ts+"px;height:0px;color:"+Tc+";visibility:hidden'></div>");
}
document.write("</div></div>");
for(j=0; j < Cols; j++){
RC[j]=1+Math.round(Math.random()*Cl);
Y[j]=0;
Sp[j]=Math.round(MnS+Math.random()*MxS);
for(i=0; i < RC[j]; i++){
B[i]='';
C[i]=Math.round(Math.random()*1)+' ';
M[j]=B[0]+=C[i];
}
}
function Cycle(){
Container.style.top=window.document.body.scrollTop;
for (i=0; i < Cols; i++){
var r = Math.floor(Math.random()*Tcc.length);
E[i] = '<font color='+Tc1+'>'+Tcc[r]+'</font>';
Y[i]+=Sp[i];
if (Y[i] > window.document.body.clientHeight){
for(i2=0; i2 < Cols; i2++){
RC[i2]=1+Math.round(Math.random()*Cl);
for(i3=0; i3 < RC[i2]; i3++){
B[i3]='';
C[i3]=Math.round(Math.random()*1)+' ';
C[Math.floor(Math.random()*i2)]=' '+' ';
M[i]=B[0]+=C[i3];
Y[i]=-Ts*M[i].length/1.5;
A[i].style.visibility='visible';
}
Sp[i]=Math.round(MnS+Math.random()*MxS);
}
}
A[i].style.top=Y[i];
A[i].innerHTML=M[i]+' '+E[i]+' ';
}
setTimeout('Cycle()',20)
}
Cycle();
}
</SCRIPT>
</body>
</html>
Sumber dari situs Ilmu Website dalam kategori javascript dengan judul Tulisan Matrix
Script ini hanya jalan di Internet Explorer
-------
contoh buka: http://www.ilmuwebsite.com/javascript/javascript-matrix.htm
<html>
<head>
</head>
<body bgcolor="#000000">
<STYLE type=text/css>#supertext {
LEFT: 0px; VISIBILITY: hidden; POSITION: absolute; TOP: 0px
}
</STYLE>
<SCRIPT language=JavaScript1.2>
//Configure the below three variables
//1) Set message to display (HTML accepted)
var thecontent='<h2><font face="Courier New" font size="5" color="#00FF00">ilmuwebsite.com - Webmaster Resource</font></h2>'
//2) Set delay after which message should be hidden, in miliseconds ('' makes it incessantly visible on the screen)
var hidetimer='';
//3) Set speed of animation (1-50), where larger is faster
var BallSpeed = 20;
///NO NEED TO EDIT BELOW THIS LINE///////////
var contentWidth;
var contentHeight;
var maxBallSpeed = 50;
var xMax;
var yMax;
var xPos = 0;
var yPos = 0;
var xDir = 'right';
var yDir = 'down';
var superballRunning = true;
var tempBallSpeed;
var currentBallSrc;
var newXDir;
var newYDir;
function initializeBall() {
if (document.all) {
xMax = document.body.clientWidth
yMax = document.body.clientHeight
document.all("supertext").style.visibility = "visible";
contentWidth=supertext.offsetWidth
contentHeight=supertext.offsetHeight
}
else if (document.layers) {
xMax = window.innerWidth;
yMax = window.innerHeight;
contentWidth=document.supertext.document.width
contentHeight=document.supertext.document.height
document.layers["supertext"].visibility = "show";
}
setTimeout('moveBall()',400);
if (hidetimer!='')
setTimeout("hidetext()",hidetimer)
}
function moveBall() {
if (superballRunning == true) {
calculatePosition();
if (document.all) {
document.all("supertext").style.left = xPos + document.body.scrollLeft;
document.all("supertext").style.top = yPos + document.body.scrollTop;
}
else if (document.layers) {
document.layers["supertext"].left = xPos + pageXOffset;
document.layers["supertext"].top = yPos + pageYOffset;
}
animatetext=setTimeout('moveBall()',20);
}
}
function calculatePosition() {
if (xDir == "right") {
if (xPos > (xMax - contentWidth - BallSpeed)) {
xDir = "left";
}
}
else if (xDir == "left") {
if (xPos < (0 + BallSpeed)) {
xDir = "right";
}
}
if (yDir == "down") {
if (yPos > (yMax - contentHeight - BallSpeed)) {
yDir = "up";
}
}
else if (yDir == "up") {
if (yPos < (0 + BallSpeed)) {
yDir = "down";
}
}
if (xDir == "right") {
xPos = xPos + BallSpeed;
}
else if (xDir == "left") {
xPos = xPos - BallSpeed;
}
else {
xPos = xPos;
}
if (yDir == "down") {
yPos = yPos + BallSpeed;
}
else if (yDir == "up") {
yPos = yPos - BallSpeed;
}
else {
yPos = yPos;
}
}
function hidetext(){
if (document.all)
supertext.style.visibility="hidden"
else if (document.layers)
document.supertext.visibility="hide"
clearTimeout(animatetext)
}
if (document.all||document.layers){
document.write('<span id="supertext"><nobr>'+thecontent+'</nobr></span>')
window.onload = initializeBall;
window.onresize = new Function("window.location.reload()");
}
</SCRIPT>
<SCRIPT language=JavaScript>
if (document.all){
Cols=22;
Cl=18; //Peþpeþe geliþ mesafeleri!
Cs=110; //Sayfaya enine yayýlýþ mesafeleri!
Ts=12; //Rakamlarýn büyüklükleri!
Tc='#00FF00';//Renk
Tc1='#00FF00';//Renk1
MnS=22; //Akýþ hýzlarý!
MxS=50; //Akýþ hýzlarý!
I=Cs;
Sp=new Array();S=new Array();Y=new Array();
C=new Array();M=new Array();B=new Array();
RC=new Array();E=new Array();Tcc=new Array(0,1,7,9,3,2);
document.write("<div id='Container' style='position:absolute;top:0;left:-"+Cs+"'>");
document.write("<div style='position:relative'>");
for(i=0; i < Cols; i++){
S[i]=I+=Cs;
document.write("<div id='A' style='position:absolute;top:0;font-family:Arial;font-size:"
+Ts+"px;left:"+S[i]+";width:"+Ts+"px;height:0px;color:"+Tc+";visibility:hidden'></div>");
}
document.write("</div></div>");
for(j=0; j < Cols; j++){
RC[j]=1+Math.round(Math.random()*Cl);
Y[j]=0;
Sp[j]=Math.round(MnS+Math.random()*MxS);
for(i=0; i < RC[j]; i++){
B[i]='';
C[i]=Math.round(Math.random()*1)+' ';
M[j]=B[0]+=C[i];
}
}
function Cycle(){
Container.style.top=window.document.body.scrollTop;
for (i=0; i < Cols; i++){
var r = Math.floor(Math.random()*Tcc.length);
E[i] = '<font color='+Tc1+'>'+Tcc[r]+'</font>';
Y[i]+=Sp[i];
if (Y[i] > window.document.body.clientHeight){
for(i2=0; i2 < Cols; i2++){
RC[i2]=1+Math.round(Math.random()*Cl);
for(i3=0; i3 < RC[i2]; i3++){
B[i3]='';
C[i3]=Math.round(Math.random()*1)+' ';
C[Math.floor(Math.random()*i2)]=' '+' ';
M[i]=B[0]+=C[i3];
Y[i]=-Ts*M[i].length/1.5;
A[i].style.visibility='visible';
}
Sp[i]=Math.round(MnS+Math.random()*MxS);
}
}
A[i].style.top=Y[i];
A[i].innerHTML=M[i]+' '+E[i]+' ';
}
setTimeout('Cycle()',20)
}
Cycle();
}
</SCRIPT>
</body>
</html>
Sumber dari situs Ilmu Website dalam kategori javascript dengan judul Tulisan Matrix
Langganan:
Postingan (Atom)
Merubah Nama Domain Localhost
Assalamu’alaikum wr. wb. Bagi temen-temen semua khususnya yang hoby coding dengan php mungkin dah nggak asing lagi dengan kata “localhost”....
-
Seting Ideal Ngoook Tanda Basah Mekanik umum maupun balap, paham betul sama suara ngoook yang muncul dari karburator. Jelas, karena i...
-
HUT CB Jombang sungguh meriah.semua club CB seantero jawa ato mungkin dari luar jawa semua nya berkumpul di jombang.para penggemar CB berk...
-
Jaket kulit tren lagi. Malah, kalau diperhatikan, saat ini variannya makin beragam. Jika dulu fashion item itu kental dengan kesan macho, ki...