Bugün: 07/10/2008. Hoşgeldiniz!

Nisan, 2008

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

Donanım - Metaram Geliyor (scripti, nasıl, nedir?)

Yazan: admin Tarih: Nisan - 15 - 2008

öncelikle aşağıdaki javascript dosyasını indirin.

DOWNLOAD

Ö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