IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası
  sohbet

Yeni Konu aç Cevapla
 
LinkBack Seçenekler Stil
Alt 11 Kasım 2014, 05:03   #1
Çevrimdışı
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
Javascript kodlarının client ta görünmesini ve cache atılmasını engellemek




PHP Kod:   Kodu kopyalamak için üzerine çift tıklayın!
javascript.php adlı dosya olarak kaydedin.

<?php
[MENTION=449]session[/MENTION]_start(); //Start our session.
header("Cache-Control: no-store, no-cache"); //Tell the browser to not cache this page (don't store it in the internet temp folder).
header("Content-type: text/javascript"); //Let the browser think that this is a Javascript page.
//If the session value is TRUE that means the client has opened the main page (which creates our session and sets its value to TRUE).
if ($_SESSION["PrintTheJavaScript"] == true){
//Now we can print our javascript code using PHP's echo command.
echo '
// Here is our hidden javascript source.
var Something="This is a real hidden Javascript code";
alert(Something);
// End of our hidden javascript source.
'
;
}else{
//If the client tried to open the page straight from the browser (he is trying to see our hidden code).
// Print some fake code or don't print anything.
}
//Set the session value to false AND THIS IS FIRST PART OF THE TRICK.
//because we are going to call this page again and it'll print nothing (because $_SESSION["PrintTheJavaScript"] <> TRUE)
//so even if the client tried to SAVE the page this page will be saved empty.
$_SESSION["PrintTheJavaScript"] = false;
?>

index.php dosyası olarak kaydedin

<?PHP
[MENTION=449]session[/MENTION]_start(); //Start our session.
if(@!session_is_registered('PrintTheJavaScript')){ //If the session is not registered (and it's not).
[MENTION=449]session[/MENTION]_register('PrintTheJavaScript'); //Register the session.
// End if(@!session_is_registered('Pri...
$_SESSION["PrintTheJavaScript"] = true//Set the session value to TRUE.
?>


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256" />
<title>Hide Javascript Code</title>
<!--Here we call our Javascript page the first time it'll provide us with our javascript code -->
<script language="javascript" src="./javascript.php"></script>
<!--
We call the same page again AND THIS IS SECOND PART OF THE TRICK.
because after we called it the first time it will set the session value to FALSE which mean it will print NOTHING
-->
<script language="javascript" src="./javascript.php"></script>
</head>
Try to save this page or go straight from your browser to the (javascript.php) page<br>
and see if you can get my javascript code.<br>
YOU'LL NEVER CAN.
<body>
</body>
</html>

Alıntıdır.

__________________
Bu kez pek bir afili yalnızlık, ağlatan bir kadın kadar düşman. Ağzı bozuk üstelik bırakmıyor acıtmadan.
 
Alıntı ile Cevapla

IRCForumlari.NET Reklamlar
sohbet odaları sohbet odaları Benimmekan Mobil Sohbet
Cevapla

Etiketler
atılmasını, cache, client, engellemek, görünmesini, javascript, kodlarının, ta, ve


Konuyu Toplam 1 Üye okuyor. (0 Kayıtlı üye ve 1 Misafir)
 
Seçenekler
Stil

Yetkileriniz
Konu Acma Yetkiniz Yok
Cevap Yazma Yetkiniz Yok
Eklenti Yükleme Yetkiniz Yok
Mesajınızı Değiştirme Yetkiniz Yok

BB code is Açık
Smileler Açık
[IMG] Kodları Açık
HTML-Kodu Kapalı
Trackbacks are Kapalı
Pingbacks are Açık
Refbacks are Açık


Benzer Konular
Konu Konuyu Başlatan Forum Cevaplar Son Mesaj
Dns ve Cache Kafkef IRCd 8 06 Mart 2015 16:17
Sayfanın cahce ye atılmasını engellemek hAte PHP 0 30 Ekim 2014 07:29
Dudaklarınızın Güzel Görünmesini İstiyorsanız..? Sevda Ah Kadınlar 0 04 Eylül 2011 13:23
INPUT kodlarının birleştirilmesi By_ATMACA mIRC Scripting Sorunları 1 10 Nisan 2011 11:20
Operların atılmasını engellemek? deliche Unreal IRCd 5 18 Haziran 2009 12:06