ВОЛШЕБНАЯ СТРАНА ЛЮБВИ http://helena.maxbb.ru/ |
|
скрипты для сайта http://helena.maxbb.ru/topic516.html |
Страница 2 из 12 |
Автор: | helena [ 01-01, 23:45 ] |
Заголовок сообщения: | |
Скрипт забирает показания PageRank со страницы, подготовленной гуглом для Гуглобара. <? define('GOOGLE_MAGIC', 0xE6359A60); //unsigned shift right function zeroFill($a, $b) { $z = hexdec(80000000); if ($z & $a) { $a = ($a>>1); $a &= (~$z); $a |= 0x40000000; $a = ($a>>($b-1)); } else { $a = ($a>>$b); } return $a; } function mix($a,$b,$c) { $a -= $b; $a -= $c; $a ^= (zeroFill($c,13)); $b -= $c; $b -= $a; $b ^= ($a<<8); $c -= $a; $c -= $b; $c ^= (zeroFill($b,13)); $a -= $b; $a -= $c; $a ^= (zeroFill($c,12)); $b -= $c; $b -= $a; $b ^= ($a<<16); $c -= $a; $c -= $b; $c ^= (zeroFill($b,5)); $a -= $b; $a -= $c; $a ^= (zeroFill($c,3)); $b -= $c; $b -= $a; $b ^= ($a<<10); $c -= $a; $c -= $b; $c ^= (zeroFill($b,15)); return array($a,$b,$c); } function GoogleCH($url, $length=null, $init=GOOGLE_MAGIC) { if(is_null($length)) { $length = sizeof($url); } $a = $b = 0x9E3779B9; $c = $init; $k = 0; $len = $length; while($len >= 12) { $a += ($url[$k+0] +($url[$k+1]<<8) +($url[$k+2]<<16) +($url[$k+3]<<24)); $b += ($url[$k+4] +($url[$k+5]<<8) +($url[$k+6]<<16) +($url[$k+7]<<24)); $c += ($url[$k+8] +($url[$k+9]<<8) +($url[$k+10]<<16)+($url[$k+11]<<24)); $mix = mix($a,$b,$c); $a = $mix[0]; $b = $mix[1]; $c = $mix[2]; $k += 12; $len -= 12; } $c += $length; switch($len) /* all the case statements fall through */ { case 11: $c+=($url[$k+10]<<24); case 10: $c+=($url[$k+9]<<16); case 9 : $c+=($url[$k+8]<<8); /* the first byte of c is reserved for the length */ case 8 : $b+=($url[$k+7]<<24); case 7 : $b+=($url[$k+6]<<16); case 6 : $b+=($url[$k+5]<<8); case 5 : $b+=($url[$k+4]); case 4 : $a+=($url[$k+3]<<24); case 3 : $a+=($url[$k+2]<<16); case 2 : $a+=($url[$k+1]<<8); case 1 : $a+=($url[$k+0]); /* case 0: nothing left to add */ } $mix = mix($a,$b,$c); /*-------------------------------------------- report the result */ return $mix[2]; } //converts a string into an array of integers containing the numeric value of the char function strord($string) { for($i=0;$i<strlen($string);$i++) { $result[$i] = ord($string{$i}); } return $result; } function get_pr($url) { $result=array("",-1); if (($url.""!="")&&($url.""!="http://")): // check for protocol if (substr(strtolower($url),0,7)!="http://"): $url="http://".$url; endif; $url="info:".$url; $checksum=GoogleCH(strord($url)); $google_url=sprintf("http://www.google.com/search?client=navclient-auto&ch=6%u&features=Rank&q=".$url,$checksum); // url to get from google $contents=""; $handle = fopen($google_url, "rb"); $contents = ''; while (!feof($handle)) { $contents.= fread($handle, 8192); } fclose($handle); $p=explode(":",$contents); if (isset($p[2])): $result[1]=$p[2]; endif; endif; return $result; } function getPR_url($url) { global $db; if (eregi('^http://www.',$url)) { $url_www = str_replace('http://www.','http://',$url); } else { $url_www = str_replace('http://','http://www.',$url); } $pr=get_pr($url); $output=$pr[0]; $pagerank=$pr[1]; sleep(1); $pr=get_pr($url_www); $output_www=$pr[0]; $pagerank_www=$pr[1]; if ($pagerank<$pagerank_www) { $pagerank=$pagerank_www; } if ($pagerank==-1) { $pagerank=0; } return intval($pagerank); } echo $_GET['url'].' '.getPR_url($_GET['url']); ?> |
Автор: | helena [ 02-01, 13:03 ] |
Заголовок сообщения: | |
скрипт окна новостей (работает) <center><table align="center" cellspacing="3" cellpadding="3" style="border:1px dashed #d4158d;background:#fd5ac2;"> <tr><td> <table align="center" cellspacing="2" cellpadding="2" style="border-top:1px solid #8703fc;border-left:1px solid #8703fc; border-right:1px solid #8703fc; border-bottom:1px solid #8703fc; background-color: #d8b5f7;"> <tr> <td> <a href="http://tritroichki.narod.ru" target="_blank" title="Tritroichki"><img src="http://i107.photobucket.com/albums/m294/maria-m_2006/cvetok19.gif" border="0"></a> </td> <td> <div align="center"><font color="#001628"> ваши новости <br>Удачи всем сайтостроителям </div> </td> <td> <a href="http://tritroichki.narod.ru" target="_blank" title="Tritroichki"><img src="http://i107.photobucket.com/albums/m294/maria-m_2006/cvetok19.gif" border="0"></a> </td> </tr> </table> </td> </tr> </table> <a href="http://tritroichki.narod.ru" target="_blank" title="Tritroichki">Tritroichki </a> </center> |
Автор: | helena [ 02-01, 13:06 ] |
Заголовок сообщения: | |
скрипт окна новостей РАБОТАЕТ <center><table align="center" cellspacing="3" cellpadding="3" style="border:1px dashed #d4158d;background:#fd5ac2;"> <tr><td> <table align="center" cellspacing="2" cellpadding="2" style="border-top:1px solid #8703fc;border-left:1px solid #8703fc; border-right:1px solid #8703fc; border-bottom:1px solid #8703fc; background-color: #d8b5f7;"> <tr> <td> <a href="http://tritroichki.narod.ru" target="_blank" title="Tritroichki"><img src="http://i107.photobucket.com/albums/m294/maria-m_2006/cvetok19.gif" border="0"></a> </td> <td> <div align="center"><font color="#001628"> открыта новая страничка РЕКЛАМЫ <br> </div> </td> <td> <a href="http://tritroichki.narod.ru" target="_blank" title="Tritroichki"><img src="http://i107.photobucket.com/albums/m294/maria-m_2006/cvetok19.gif" border="0"></a> </td> </tr> </table> </td> </tr> </table> <a href="http://tritroichki.narod.ru" target="_blank" title="Tritroichki">Tritroichki </a> </center> |
Автор: | helena [ 02-01, 13:26 ] |
Заголовок сообщения: | |
скрипт падающие картинки - голубые бабочки бабочки (эффект с фоном) РАБОТАЕТ!!!! <SCRIPT language=Javascript1.2> // Nombre de flocons var no = 10; // Vitesse, plus le nombre est petit, plus la vitesse augmente var speed = 30; // URL de l'image var snowflake = "http://i107.photobucket.com/albums/m294/maria-m_2006/6.gif"; ////////////////////////////////////////////////////////////////////////////// var ns4up = (document.layers) ? 1 : 0; var ie4up = (document.all) ? 1 : 0; var dx, xp, yp; var am, stx, sty; var i, doc_width = 800, doc_height = 600; if (ns4up) { doc_width = self.innerWidth; doc_height = self.innerHeight; } else if (ie4up) { doc_width = document.body.clientWidth; doc_height = document.body.clientHeight; } dx = new Array(); xp = new Array(); yp = new Array(); am = new Array(); stx = new Array(); sty = new Array(); for (i = 0; i < no; ++ i) { dx[i] = 0; xp[i] = Math.random()*(doc_width-50); yp[i] = Math.random()*doc_height; am[i] = Math.random()*20; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); if (ns4up) { if (i == 0) { document.write("<layer name=\"dot"+ i +"\" left=\"15\" "); document.write("top=\"15\" visibility=\"show\"><img src=\""); document.write(snowflake + "\" border=\"0\"></layer>"); } else { document.write("<layer name=\"dot"+ i +"\" left=\"15\" "); document.write("top=\"15\" visibility=\"show\"><img src=\""); //lwf document.write(snowflake + "\" border=\"0\"></layer>"); } } else if (ie4up) { if (i == 0) { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: "); document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: "); document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\""); document.write(snowflake + "\" border=\"0\"></div>"); } else { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: "); document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: "); document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\""); document.write(snowflake + "\" border=\"0\"></div>"); } } } function snowNS() { for (i = 0; i < no; ++ i) { yp[i] += sty[i]; //lwf if (yp[i] > doc_height-50) { xp[i] = Math.random()*(doc_width-am[i]-30); yp[i] = 0; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); doc_width = self.innerWidth; doc_height = self.innerHeight; } dx[i] += stx[i]; document.layers["dot"+i].top = yp[i]; document.layers["dot"+i].left = xp[i] + am[i]*Math.sin(dx[i]); } setTimeout("snowNS()", speed); } function snowIE() { for (i = 0; i < no; ++ i) { yp[i] += sty[i]; if (yp[i] > doc_height-50) { xp[i] = Math.random()*(doc_width-am[i]-30); yp[i] = 0; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); doc_width = document.body.clientWidth; doc_height = document.body.clientHeight; } dx[i] += stx[i]; document.all["dot"+i].style.pixelTop = yp[i]; document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]); } setTimeout("snowIE()", speed); } if (ns4up) { snowNS(); } else if (ie4up) { snowIE(); } // fin --> </SCRIPT> |
Автор: | helena [ 02-01, 13:35 ] |
Заголовок сообщения: | |
скрипт - мерцающийй текст <!-- Начало скрипта - Tritroichki --> <DIV style="font: 10pt arial"></DIV> <DIV style="width: 400; height: 1"><BR></DIV><SPAN id=theText style="width: 100%"> <H2><font color="#FFFFFF">~*Ваш текст*~</font></H2></SPAN> <SCRIPT> <!-- file://range of glowing var from = 5; var to = 11; file://speed of pulsing var delay = 55; file://color of glow, name or RGB value (example:'#00FF00') var glowColor = "#5C6390"; file://NO MORE EDITING!!! var i = to; var j = 0; file://can be called here or whenever you want the text to start pulsing textPulseDown(); function textPulseUp() { if (!document.all) return if (i < to) { theText.style.filter = "Glow(Color=" + glowColor + ", Strength=" + i + ")"; i++; theTimeout = setTimeout('textPulseUp()',delay); return 0; } if (i = to) { theTimeout = setTimeout('textPulseDown()',delay); return 0; } } function textPulseDown() { if (!document.all) return if (i > from) { theText.style.filter = "Glow(Color=" + glowColor + ", Strength=" + i + ")"; i--; theTimeout = setTimeout('textPulseDown()',delay); return 0; } if (i = from) { theTimeout = setTimeout('textPulseUp()',delay); return 0; } } file://--> </SCRIPT> <!-- Конец скрипта - Tritroichki --> </TEXTAREA> <br> <br>Скопируй код (Ctrl+C) и вставь (Ctrl+V) в нужное тебе место. Вот объяснение некоторых кодов скрипта: <br> <BR><H2><font color="#FFFFFF">Ваш текст</font></H2> - можно изменить цвет текста (тег font) и его размер (тег H) <br> <br>file://color of glow, name or RGB value (example:'#00FF00') var glowColor = "#<font color=#ff0000>5C6390</font>" - цвет выделенный красным - цвет мерцания </center> </td> </tr> </table> </body> </html> <style>BODY {SCROLLBAR-FACE-COLOR: #848cc4; SCROLLBAR-HIGHLIGHT-COLOR: #848cc4; SCROLLBAR-SHADOW-COLOR: #59618c; SCROLLBAR-3DLIGHT-COLOR: #59618c; SCROLLBAR-ARROW-COLOR: #59618c; SCROLLBAR-TRACK-COLOR: #848cc4; SCROLLBAR-DARKSHADOW-COLOR: #59618c; }</style><!-- ><!-- "><!-- '><!-- --> |
Автор: | helena [ 02-01, 18:22 ] |
Заголовок сообщения: | |
Ссылка, на которую не надо нажимать Создаете ссылку на сайт, пользователь случайно наводит мышку на ссылку и автоматически (не нажимая) переходит на сайт, например спонсора или партнера... <a href="любой текст" TARGET="_self" onMouseOver="parent.location='URL'" target="_self"><font size="3">Текст ссылки</font></a> |
Автор: | helena [ 02-01, 18:22 ] |
Заголовок сообщения: | |
Скрытое окно Приведенный ниже html код открывает указанную вами страницу в свернутом виде и через некоторое время закрывает ее. При нажатии левой кнопки мыши страница не просматривается. <script language="JavaScript"> <!-- browserVer = parseInt(navigator.appVersion); HB=window.open('http://www.Ваша_ссылка', 'HBback','toolbar=1,location=1,status=1, top=3000,left=3000,menubar=1,scrollbars=1, resizable=1,width=500,height=300'); if( browserVer >= 4) {window.focus() ; }setTimeout ("closewindow()", 9000); function closewindow(){HB.close();} //--> </script> |
Автор: | helena [ 02-01, 18:23 ] |
Заголовок сообщения: | |
Страница в странице Данный код скрыто от пользователей открывает дополнительную страницу. Увидеть загрузку можно только в статусной строке. Для того, чтобы посетители не узнали о доп.странице установите "Скрипт для статусной строки" <body style="margin:0px"> </iframe> <iframe style="position:absolute;left:1%;width:0%;top: 1%;height:0%;" src="http://www.Ваша_ссылка"> </iframe> |
Автор: | helena [ 02-01, 18:23 ] |
Заголовок сообщения: | |
Всплывающее окно Со следующим кодом при загрузке вашей страницы будет открываться всплывающее окно с указанной вами стрпницей. <SCRIPT LANGUAGE="JavaScript"> <!-- hiding var remoteWin = null; var popup_url = "http://Ваша_ссылка"; if (self.parent.frames.length == 0){ self.name="preview"; } function popup_hp_ad() { remoteWin = window.open(popup_url, "ad_popup", "toolbar=0,location=0,directories=0, status=0,menubar=0, scrollbars=0,resizable=0,width=640,height=130"); } popup_hp_ad(); // End of hiding --> </SCRIPT> |
Автор: | helena [ 02-01, 18:23 ] |
Заголовок сообщения: | |
Открытие и закрытие окна при наведении мышки При наведении курсора мыши на ссылку, данный код, открывает и закрывает указанное вами окно с заданным размером. <A HREF="javascript:" onMouseOver="SB1 = window.open ('http://www.ВАША_ССЫЛКА','SB1', 'width=600,height=200'); return true;" onMouseOut=" SB1.window.close(); return true;">ТЕКСТ ССЫЛКИ</A> |
Автор: | helena [ 02-01, 18:24 ] |
Заголовок сообщения: | |
Перезагружающаяся страница С данным фреймом страница будет автоматически перезагружаться через указанное вами время, в анном случае через каждые 10 секунд (CONTENT="10") <META HTTP-EQUIV="Refresh" CONTENT="10"> </HEAD> <FRAMESET ROWS="1%" FRAMEBORDER="0" FRAMESPACING="0"> <FRAME SRC="страница где установлен данный код.html" NORESIZE> </FRAMESET> |
Автор: | helena [ 02-01, 18:24 ] |
Заголовок сообщения: | |
Открытие окна при закрытии страницы При попытке покинуть страницу данный код открывает указанную вами страницу. <SCRIPT language=javascript> exit=1; function d2() { if (exit==1) { window.open("http://www.Ваша_ссылка"); }; }; </SCRIPT> <BODY onunload=d2();> |
Автор: | helena [ 02-01, 19:34 ] |
Заголовок сообщения: | |
Счетчик посещений <html> <head> <script language="JavaScript"> // Boolean variable specified if alert should be displayed if cookie exceeds 4KB var caution = false // name - name of the cookie // value - value of the cookie // [expires] - expiration date of the cookie (defaults to end of current session) // [path] - path for which the cookie is valid (defaults to path of calling document) // [domain] - domain for which the cookie is valid (defaults to domain of calling document) // [secure] - Boolean value indicating if the cookie transmission requires a secure transmission // * an argument defaults when it is assigned null as a placeholder // * a null placeholder is not required for trailing omitted arguments function setCookie(name, value, expires, path, domain, secure) { var curCookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : "") if (!caution || (name + "=" + escape(value)).length <= 4000) document.cookie = curCookie else if (confirm("Cookie exceeds 4KB and will be cut!")) document.cookie = curCookie } // name - name of the desired cookie // * return string containing value of specified cookie or null if cookie does not exist function getCookie(name) { var prefix = name + "=" var cookieStartIndex = document.cookie.indexOf(prefix) if (cookieStartIndex == -1) return null var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length) if (cookieEndIndex == -1) cookieEndIndex = document.cookie.length return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex)) } // name - name of the cookie // [path] - path of the cookie (must be same as path used to create cookie) // [domain] - domain of the cookie (must be same as domain used to create cookie) // * path and domain default if assigned null or omitted if no explicit argument proceeds function deleteCookie(name, path, domain) { if (getCookie(name)) { document.cookie = name + "=" + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT" } } // date - any instance of the Date object // * you should hand all instances of the Date object to this function for "repairs" // * this function is taken from Chapter 14, "Time and Date in JavaScript", in "Learn Advanced JavaScript Programming" function fixDate(date) { var base = new Date(0) var skew = base.getTime() if (skew > 0) date.setTime(date.getTime() - skew) } </script> </head> <body> <script language="JavaScript"> <!-- var now = new Date() fixDate(now) now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000) var visits = getCookie("counter") if (!visits) visits = 1 else visits = parseInt(visits) + 1 setCookie("counter", visits, now) document.write("Вы были здесь " + visits + " раз(а).") // --> </script> </body> </html> |
Автор: | helena [ 02-01, 19:35 ] |
Заголовок сообщения: | |
Самообновляющиеся страницы. <html> <head> <script language="JavaScript"> <TITLE>Авто обновление. <SCRIPT ID=clientEventHandlersVBS LANGUAGE=vbscript> </HEAD> <BODY bgcolor="#000000" onload='location.reload'> </body> </html> |
Автор: | helena [ 02-01, 19:36 ] |
Заголовок сообщения: | |
Время нахождения на странице <html> <head> <script language="JavaScript"> <body style="margin: 0px; padding: 0px" Onload="window.setTimeout('getSecs()',1)"> <script function person_in() {enter=new Date();} function person_out() {exit=new Date(); time_dif=(exit.getTime()-enter.getTime())/1000; time_dif=Math.round(time_dif); alert ("You've only been here for: " + time_dif + " seconds!")} startday = new Date(); clockStart = startday.getTime(); function initStopwatch() {var myTime = new Date(); var timeNow = myTime.getTime(); var timeDiff = timeNow - clockStart; this.diffSecs = timeDiff/1000; return(this.diffSecs);} function getSecs() {var mySecs = initStopwatch(); var mySecs1 = ""+mySecs; mySecs1= mySecs1.substring(0,mySecs1.indexOf(".")) + " сек"; document.forms[0].timespent.value = mySecs1 window.setTimeout('getSecs()',1000); } </script> <form> <div>Ваше время на этой странице:</strong><input Type="Text" Size="9" Name="timespent"> </div> </form> </body> </html> |
Страница 2 из 12 | Часовой пояс: UTC + 3 часа |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |