<a href="http://www.otelreferans.com/" onmouseover="window.status='Oteller İçin Referans Sitesi'; return true;" onmouseout="window.status=''; return true;">Oteller</a>
kaynak: ordan burdan
<a href="http://www.otelreferans.com/" onmouseover="window.status='Oteller İçin Referans Sitesi'; return true;" onmouseout="window.status=''; return true;">Oteller</a>
kaynak: ordan burdan
<head>
<title>Test Page</title>
<style>
* { font-family: "Arial", sans-serif; }
#wrap { margin-top: 50px;text-align: center; }
#barwrap {
position: relative; /* to contain outer */
margin: 0 auto; /* to centre */
width: 250px;height: 20px; /* size of our bar - required */
text-align: left;
font-weight: bold;
border: 1px solid black;
}
#barwrap P { /* to contain text */
margin: 0; /* FF needs this or text drops below bar */
width: 250px; /* use this node to position text */
text-align: center;
}
#barwrap #outer { /* bar 'background' */
position: absolute;
width: 100%; height: 100%; /* match parent size */
background: lightgreen;
color: green; /* original colour of text */
}
#barwrap #inner {
position: relative; /* otherwise outer hides us */
width: 0; height: 100%; /* match parent */
overflow: hidden; /* to hide new text/prevent it wrapping */
background: green;
color: lightgreen; /* colour of changed text */
}
</style>
<script>
var time = 10000; // 10 secs
var steps = 50; // Five per second
var step = 1;
function progress() {
var bar = document.getElementById( "barwrap");
var aStep = (bar.offsetWidth -2) /steps;// 2px border removed from width
var x = Math.round( aStep *step);
var outer = document.getElementById( "outer");
var inner = document.getElementById( "inner");
// Work out seconds based on % progress from current step
var secs = (( time /1000) -Math.floor( ( step /steps) *10));
inner.style.width = x +"px";
step++;
// If 0 seconds, display waiting message instead
outer.firstChild.innerHTML = ( secs? secs +" seconds…": "Please Wait…");
// Match text
inner.firstChild.innerHTML = outer.firstChild.innerHTML;
if( step > steps) redir();
else setTimeout( "progress();", time /steps);
}
function redir() {
alert( "Redirecting now!");
}
</script>
</head>
<body>
<div id='wrap'>
Progress:
<div id='barwrap'> <!– P wrappers for text positioning –>
<div id='outer'><p></p></div> <!– original colour/text –>
<div id='inner'><p></p></div> <!– new colour/text –>
</div>
<br>
<a href='#' onClick='progress();'>Click here to start bar (only once please, you'll break it)</a>
</div>
</body>
</html>
kaynak: ordan burdan
<script type="text/javascript">
function whichType()
{
alert(event.type)
}
</script>
</head>
<body onmousedown="whichType()">
kaynak: ordan burdan
<script type="text/javascript">
function whichElement()
{
var tname
tname=event.srcElement.tagName
alert("You clicked on a " + tname + " element.")
}
</script>
</head>
<body onmousedown="whichElement()">
kaynak: ordan burdan
<html>
<head>
<script type="text/javascript">
function whichButton()
{
alert(event.keyCode)
}
</script>
</head>
<body onkeyup="whichButton()">
</body>
kaynak: ordan burdan
<html>
<head>
<script type="text/javascript">
function show_coords()
{
x=event.clientX
y=event.clientY
alert("X coords: " + x + ", Y coords: " + y)
}
</script>
</head>
<body onmousedown="show_coords()">
<p>Click in the document. An alert box will alert the x and y coordinates of the cursor.</p>
</body>
</html>
kaynak: ordan burdan
<html>
<head>
<script type="text/javascript">
function whichButton()
{
if (event.button==1)
{
alert("You clicked the left mouse button!")
}
else
{
alert("You clicked the right mouse button!")
}
}
</script>
</head>
<body onmousedown="whichButton()">
<p>Click in the document. An alert box will alert which mouse button you clicked.</p>
</body>
</html>
kaynak: ordan burdan
<script type="text/javascript">
document.write("Bu sayfada : " + document.images.length + " Adet Resim var")
</script>
kaynak: ordan burdan
<html>
<head>
<script type="text/javascript">
function getElements(elamanadi)
{
var x=document.getElementsByName(elamanadi)
alert(x.length + " elements!")
}
</script>
</head>
<body>
kaynak: ordan burdan
<html>
<head>
<title>MY TITLE</title>
</head>
<body>
The title of the document is:
<script type="text/javascript">
document.write(document.title)
</script>
</body>
</html>
kaynak: ordan burdan
<html>
<body>
<a name="A">First anchor</a><br />
<a name="B">Second anchor</a><br />
<a name="C">Third anchor</a><br />
<br />
Number of anchors in this document:
<script type="text/javascript">
document.write(document.anchors.length)
</script>
</body>
</html>
kaynak: ordan burdan
Kalan süreyi ölçmekte kullanabilirsiniz.
mesela Sınavlarda
örnek $_SESSION["mins"] : 5
5 dakika süre verilmiştir.Siz bu süreyi mins ve secs lerle oynayarak değiştirebilirsiniz.
?php
session_start();
$mins = isset($_SESSION["mins"]) ? $_SESSION["mins"] : 5;
$secs = isset($_SESSION["secs"]) ? $_SESSION["secs"] : 0;
?>
<html>
<head>
<style>
#txt {
border:2px solid red;
font-family:verdana;
font-size:16pt;
font-weight:bold;
background: #FECFC7;
width:80px;
text-align:center;
}
</style>
</head>
<body>
<form name="cd">
<input id="txt" name="txt" type="text" readonly="true">
</form>
<script>
var xmlhttp = false;
var mins = "<?php echo $mins ?>";
var secs = "<?php echo $secs ?>";
var secs1 = secs;
if(secs < 10){secs = "0" + secs;}
document.getElementById("txt").value = mins + ":" + secs;
secs = secs1;
var cd = setInterval("count_down_timer()",1000);
function count_down_timer()
{
if(secs == 0 && mins == 0)
{
clearInterval(cd);
alert("The time is up!");
}
else{if(secs == 0){secs = 59;mins–;}}
if(secs < 10){secs = "0" + secs;}
var tm = mins + ":" + secs;
document.getElementById("txt").value = tm;
send_request(mins,secs);
secs–;
}
function createRequest()
{
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
try {
xmlhttp = new XMLHttpRequest();
} catch (e) {
xmlhttp=false;
}
}
if (!xmlhttp && window.createRequest) {
try {
xmlhttp = window.createRequest();
} catch (e) {
xmlhttp=false;
}
}
return xmlhttp;
}
function send_request(m,s)
{
var conn = createRequest();
var url="update_session.php?min=" + m + "&sec=" + s;
conn.open("GET", url);
conn.send(null);
}
</script>
</body>
</html>
kaynak: ordan burdan
RewriteEngine on
# Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} sitadi-1.com [NC,OR]
RewriteCond %{HTTP_REFERER} siteadi-2.com
RewriteRule .* - [F]
/////
örnek
siteadi-1 yerine codekodu
com yerine uzantı farklı ise net,org gibi değiştirmelisiniz
birden fazla site belirleyeceğiniz gibi tek bir sitede belirleyebilirsiniz
site adından sonra belirlenmesi site içindeki diğer sayfalardan gelebilecek referrer larıda engellemek için
kaynak: ordan burdan
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^BlackWidow [OR]
RewriteCond %{HTTP_USER_AGENT} ^Bot mailto:craftbot@yahoo.com [OR]
RewriteCond %{HTTP_USER_AGENT} ^ChinaClaw [OR]
RewriteCond %{HTTP_USER_AGENT} ^Custo [OR]
RewriteCond %{HTTP_USER_AGENT} ^DISCo [OR]
RewriteCond %{HTTP_USER_AGENT} ^Download Demon [OR]
RewriteCond %{HTTP_USER_AGENT} ^eCatch [OR]
RewriteCond %{HTTP_USER_AGENT} ^EirGrabber [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailWolf [OR]
RewriteCond %{HTTP_USER_AGENT} ^Express WebPictures [OR]
RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro [OR]
RewriteCond %{HTTP_USER_AGENT} ^EyeNetIE [OR]
RewriteCond %{HTTP_USER_AGENT} ^FlashGet [OR]
RewriteCond %{HTTP_USER_AGENT} ^GetRight [OR]
RewriteCond %{HTTP_USER_AGENT} ^GetWeb! [OR]
RewriteCond %{HTTP_USER_AGENT} ^Go!Zilla [OR]
RewriteCond %{HTTP_USER_AGENT} ^Go-Ahead-Got-It [OR]
RewriteCond %{HTTP_USER_AGENT} ^GrabNet [OR]
RewriteCond %{HTTP_USER_AGENT} ^Grafula [OR]
RewriteCond %{HTTP_USER_AGENT} ^HMView [OR]
RewriteCond %{HTTP_USER_AGENT} HTTrack [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Image Stripper [OR]
RewriteCond %{HTTP_USER_AGENT} ^Image Sucker [OR]
RewriteCond %{HTTP_USER_AGENT} Indy Library [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^InterGET [OR]
RewriteCond %{HTTP_USER_AGENT} ^Internet Ninja [OR]
RewriteCond %{HTTP_USER_AGENT} ^JetCar [OR]
RewriteCond %{HTTP_USER_AGENT} ^JOC Web Spider [OR]
RewriteCond %{HTTP_USER_AGENT} ^larbin [OR]
RewriteCond %{HTTP_USER_AGENT} ^LeechFTP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mass Downloader [OR]
RewriteCond %{HTTP_USER_AGENT} ^MIDown tool [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mister PiX [OR]
RewriteCond %{HTTP_USER_AGENT} ^Navroad [OR]
RewriteCond %{HTTP_USER_AGENT} ^NearSite [OR]
RewriteCond %{HTTP_USER_AGENT} ^NetAnts [OR]
RewriteCond %{HTTP_USER_AGENT} ^NetSpider [OR]
RewriteCond %{HTTP_USER_AGENT} ^Net Vampire [OR]
RewriteCond %{HTTP_USER_AGENT} ^NetZIP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Octopus [OR]
RewriteCond %{HTTP_USER_AGENT} ^Offline Explorer [OR]
RewriteCond %{HTTP_USER_AGENT} ^Offline Navigator [OR]
RewriteCond %{HTTP_USER_AGENT} ^PageGrabber [OR]
RewriteCond %{HTTP_USER_AGENT} ^Papa Foto [OR]
RewriteCond %{HTTP_USER_AGENT} ^pavuk [OR]
RewriteCond %{HTTP_USER_AGENT} ^pcBrowser [OR]
RewriteCond %{HTTP_USER_AGENT} ^RealDownload [OR]
RewriteCond %{HTTP_USER_AGENT} ^ReGet [OR]
RewriteCond %{HTTP_USER_AGENT} ^SiteSnagger [OR]
RewriteCond %{HTTP_USER_AGENT} ^SmartDownload [OR]
RewriteCond %{HTTP_USER_AGENT} ^SuperBot [OR]
RewriteCond %{HTTP_USER_AGENT} ^SuperHTTP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Surfbot [OR]
RewriteCond %{HTTP_USER_AGENT} ^tAkeOut [OR]
RewriteCond %{HTTP_USER_AGENT} ^Teleport Pro [OR]
RewriteCond %{HTTP_USER_AGENT} ^VoidEYE [OR]
RewriteCond %{HTTP_USER_AGENT} ^Web Image Collector [OR]
RewriteCond %{HTTP_USER_AGENT} ^Web Sucker [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebAuto [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebCopier [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebFetch [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebGo IS [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebLeacher [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebReaper [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebSauger [OR]
RewriteCond %{HTTP_USER_AGENT} ^Website eXtractor [OR]
RewriteCond %{HTTP_USER_AGENT} ^Website Quester [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebStripper [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebWhacker [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebZIP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Wget [OR]
RewriteCond %{HTTP_USER_AGENT} ^Widow [OR]
RewriteCond %{HTTP_USER_AGENT} ^WWWOFFLE [OR]
RewriteCond %{HTTP_USER_AGENT} ^Xaldon WebSpider [OR]
RewriteCond %{HTTP_USER_AGENT} ^Zeus
RewriteRule ^.* - [F,L]
kaynak: ordan burdan
ErrorDocument
400 /errors/badrequest.htmlErrorDocument
401 /errors/authreqd.htmlErrorDocument
403 /errors/forbid.htmlErrorDocument
404 /errors/notfound.htmlErrorDocument
500 /errors/serverr.html
//yukaradikiler .htaccess dosyasına yazılacak
/errors/ klasör adıdır sizinki farklı olabilir
notfound.htmlErrorDocument buradaki
notfound.html dosyasını istediğiniz dosya adıyla değiştirebilirsiniz
yukarıdaki html dosyalarının hepsi için geçerlidir.
php dosyasınada yönlendirebilirsiniz
kaynak: ordan burdan
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.otelreferans.com/index.php $1 [R=301,L]
kaynak: ordan burdan
yazıların mouse ile seçilmemesini ve sağ tuşun çslışmasını engeller
<html>
<head>
<script>
document.addEvent('contextmenu',function(e){
e=new Event(e);
//alert('success');
e.stop();
});
function selectnone() {
document.body.ondrag = function () { return false; };
document.body.onselectstart = function () { return false; };
if(window.ie || window.opera){document.body.setProperty("unselectable","on");}
if(window.gecko){document.body.setStyle("MozUserSelect","none");}
if(window.webkit){document.body.setStyle("KhtmlUserSelect","none");}
}
</script>
</head>
<body onload="selectnone()">
bu yazılar mouse ile seçilip kopyalanamaz
</body>
</html>
kaynak: ordan burdan
MetaRAM'in kullandığı yöntemlerden biri bellek yongalarını üç boyutlu olarak dizip istifleyerek bir modül üzerine çok daha fazla yonga yerleştirmek. Bu tip bir yöntem uyumluluk problemi yaratabilirdi, ancak bellek modüllerinde yer alacak bu işlemcilerle okuma ve yazma işlemleri doğru şekilde yönlendirilerek 8 GB kapasite yaratılıyor.
Şirket bu yeni ürünüyle bir hayli iddialı: "Bu belleğin piyasaya çıkmasıyla bellek teknolojisi çok daha
hızlı ilerleyecek." Daha önce de bahsettiğimiz üzere sistemi modifiye etmeksizin, bu bellek teknolojisi mevcut AMD ve Intel sunucularında ve iş istasyonlarında çalışabilecek.
MetaRAM'in CEO'su Fred Weber bu konuda düşüncesini şu şekilde ifade etti: "Ben kariyerimi bilgisayar sistemlerine yeni çözümler getirmeye ayırdım. Çift çekirdekli 64 bit işlemcilerin çıkmasıyla beraber farkettim ki şu anki bellek sistemi adeta bir darboğazda ve bu problemin çözülmesi gerekiyor."
Sunucu yazılımlarının hızla düşmesiyle küçük çaplı firmalar dahi hızlı şekilde kendilerini en güncel donanımlarla donatıyorlar. Intel'den bir yetkili ise görüşünü şu şekilde savunuyor: "MetaRAM teknolojisi, bir yatırımcı ve stratejik teknoloji işbirlikçisi olarak Intel'in gelişmiş sistemleri yakalamasına şans tanıyor."
kaynak: ordan burdan
öncelikle aşağıdaki javascript dosyasını indirin.
ÖRNEKLER
<script src="sorttable.js"></script>
<table class="sortable">
<thead>
<tr><th>Person</th><th>Monthly pay</th></tr>
</thead>
<tbody>
<tr><td>Jan Molby</td><td>£12,000</td></tr>
<tr><td>Steve Nicol</td><td>£8,500</td></tr>
<tr><td>Steve McMahon</td><td>£9,200</td></tr>
<tr><td>John Barnes</td><td>£15,300</td></tr>
</tbody>
<tfoot>
<tr><td>TOTAL</td><td>£45,000</td></tr>
</tfoot>
</table>
<P>
<table class="sortable">
<tr><th>Number (spelled)</th><th>Person</th></tr>
<tr><td sorttable_customkey="2">two</td><td>Jan</td></tr>
<tr><td sorttable_customkey="3">three</td><td>Bruce</td></tr>
<tr><td sorttable_customkey="1">one</td><td>Steve</td></tr>
</table>
kaynak: ordan burdan
görmeninizi tavsiye ederim
<SCRIPT>
var deg2radians = Math.PI * 2 / 360;
function fnSetRotation(oObj, deg)
{ rad = deg * deg2radians ;
costheta = Math.cos(rad);
sintheta = Math.sin(rad);
oObj.filters.item(0).M11 = costheta;
oObj.filters.item(0).M12 = -sintheta;
oObj.filters.item(0).M21 = sintheta;
oObj.filters.item(0).M22 = costheta;
}
//oObj input requires that a matrix filter be applied.
//flMultiplier input defines the amount by which the oObj is resized.
function fnResize(oObj, flMultiplier)
{ oObj.filters.item(0).M11 *= flMultiplier;
oObj.filters.item(0).M12 *= flMultiplier;
oObj.filters.item(0).M21 *= flMultiplier;
oObj.filters.item(0).M22 *= flMultiplier;
}
var iCount = 400;
function fnSpin(oObj)
{
var flMultiple = iCount/720;
iCount += 4;
if (iCount>=360*3) {
oObj.onfilterchange = null;
}
fnSetRotation(oObj, iCount);
fnResize(oObj, flMultiple);
}
</SCRIPT>
<!– When loaded, the onfilterchange event is fired as the filter makes
its initial settings. This starts the animation.–>
<DIV ID="oDiv" STYLE="position:absolute;
filter:progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand')"
onfilterchange="fnSpin(this)" >
<DIV STYLE=" background-color: lightblue; padding:5;">
www.otelreferans.com<BR/>
www.otelreferans.com<BR/>
www.otelreferans.com<BR/>
www.otelreferans.com<BR/>
</DIV>
</DIV>
kaynak: ordan burdan
<HTML>
<HEAD>
</HEAD>
<BODY>
<SCRIPT>
// Define a function that extends the capabilities of String objects
function reverse()
{
myArray = new Array(this.length);
for(myEnum=0; myEnum<this.length; myEnum++)
{
myArray[myEnum] = this.substr(myEnum,1)
}
myArray.reverse();
return myArray.join("");
}
// Register the new function
String.prototype.reverse = reverse;
// Create a string object and test the String.reverse() method
myString = new String("ABCDEFGH");
document.write(myString.reverse())
document.write("<BR>")
</SCRIPT>
</BODY>
</HTML>
kaynak: ordan burdan
$saatfarki = "8"; // ne kadar saat geri
$farki = (date("H") + ($saatfarki));
$gerial = mktime( $farki , date("i"), date("s"), date("m"), date("d"), date("Y"));
$tarih = date("Y-m-d",$gerial);
$yenizaman = date("H:i:s",$gerial);
kaynak: ordan burdan
//CAPTCHA OLUŞTURMA
<?php
session_start();
$width = 140;
$height = 70;
$im = imagecreate($width, $height);
$bg = imagecolorallocate($im, 0, 0, 0);
// generate random string
$len = 5;
$chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
$string = '';
for ($i = 0; $i < $len; $i++) {
$pos = rand(0, strlen($chars)-1);
$string .= $chars{$pos};
}
$_SESSION['captcha_code'] = md5($string);
// grid
$grid_color = imagecolorallocate($im, 175, 0, 0);
$number_to_loop = ceil($width / 20);
for($i = 0; $i < $number_to_loop; $i++) {
$x = ($i + 1) * 20;
imageline($im, $x, 0, $x, $height, $grid_color);
}
$number_to_loop = ceil($height / 10);
for($i = 0; $i < $number_to_loop; $i++) {
$y = ($i + 1) * 10;
imageline($im, 0, $y, $width, $y, $grid_color);
}
// random lines
$line_color = imagecolorallocate($im, 130, 0, 0);
for($i = 0; $i < 30; $i++) {
$rand_x_1 = rand(0, $width - 1);
$rand_x_2 = rand(0, $width - 1);
$rand_y_1 = rand(0, $height - 1);
$rand_y_2 = rand(0, $height - 1);
imageline($im, $rand_x_1, $rand_y_1, $rand_x_2, $rand_y_2, $line_color);
}
// write the text
$text_color = imagecolorallocate($im, 255, 0, 0);
$rand_x = rand(0, $width - 50);
$rand_y = rand(0, $height - 15);
imagestring($im, 10, $rand_x, $rand_y, $string, $text_color);
header ("Content-type: image/png");
imagepng($im);
?>
////////////////////////////////////////////////////
DOÐRULAMA SAYFASI
<?php
session_start();
if(isset($_POST['submit'])) {
if(isset($_POST['captcha_code']) && isset($_SESSION['captcha_code'])) {
if(md5($_POST['captcha_code']) == $_SESSION['captcha_code']) {
echo 'Result: CAPTCHA code correct.<br />';
}else{
echo 'Result: CAPTCHA code incorrect.<br />';
}
}else{
if(!isset($_POST['captcha_code'])) {
echo 'Result: No security code was entered.<br />';
}
if(!isset($_SESSION['captcha_code'])) {
echo 'Result: No CAPTCHA was viewed.<br />';
}
}
}
?>
<form method="POST">
<img src="captcha.php" />
<br />
Enter the above text EXACTALY as it appears. Note: It is case sensitive<br />
<input type="text" name="captcha_code" />
<br />
<input type="submit" name="submit" value="Submit" />
</form>
kaynak: ordan burdan
<?php
function js_redirect($url, $seconds=5) {
echo "<script language="JavaScript">
";
echo "<!- hide code from displaying on browsers with JS turned off
";
echo "function redirect() {
";
echo "window.location = "" . $url . "";
";
echo "}
";
echo "timer = setTimeout('redirect()', '" . ($seconds*1000) . "');
";
echo "->
";
echo "</script>
";
return true;
}
örnek :
js_redirect(http://google.com,5);//5 saniye sonra google sayfasına gidecek
kaynak: ordan burdan