Hoşgeldin, Ziyaretçi:

l Üye Ol
Tarih: 21-09-2018, Saat: 18:15
  • Tekno Destek Team'e Hoşgeldiniz
  • Teknoloji, Mobil, Oyun, İnternet, Haber Platforumu
  • Tekno Destek Team ( TDT )
Tekno Destek Team - Teknoloji, Mobil, Oyun, İnternet, Haber Platforumu > Bilgi Teknolojileri / Information Technologies > Web Programlama > HOTLINK KORUMASI ( CLASS ) >

 Yorum: 0    Görüntülenme: 419
Konuyu Oyla:
  • Toplam: 0 Oy - Ortalama: 0
  • 1
  • 2
  • 3
  • 4
  • 5
 HOTLINK KORUMASI ( CLASS )
04-01-2016, Saat: 00:31,
Çevrimdışı
Süper Moderatör
Süper Moderatör Grubu
Üyelik Tarihi: 02-01-2016
Mesajlar : 427
Konular:
Rep Puanı: 0
#1
HOTLINK KORUMASI ( CLASS )

<? 
/*********************************************/ 
/* Desenvolvido por Jonis Maurin Ceará */ 
/* jonis@jonis.cjb.net */ 
/* ( LifeGuarD ) */ 
/* UIN: 5719948 */ 
/* */ 
/* */ 
/* This class block download from */ 
/* other sites. You can add domains */ 
/* that are enabled to download your */ 
/* files. You can also share files */ 
/* that are in non-web folder. */ 
/* */ 
/* */ 
/* Questions? */ 
/* e-mail: jonis@jonis.cjb.net */ 
/* */ 
/* */ 
/* This script is freeware, you are */ 
/* free to copy, but you should keep */ 
/* copyright note. */ 
/* */ 
/* Este script é freeware, voce pode */ 
/* usa-lo a vontade desde que mantenha */ 
/* os creditos no mesmo. */ 
/* */ 
/*********************************************/ 

class D_Security { 

var $lista; 
var $path; 

function Dow_Security() { 
$this->lista = array(); // Create empty host list 
$this->path = "./"; // set default path do current folder 


function SetPath($path) { 
$this->path = $path; 


function AddHost($host) { 
if (empty($host)) { 
return false; 

$this->lista[] = $host; 
return true; 


function RemoveHost($host) { 
for ($i=0;$i<count($this->lista);$i++) { 
if ($this->lista[$i]==$host) { 
$this->RemoveArrayItem($this->lista,$i); 




function ListHosts() { 
return $this->lista; 


function RemoveArrayItem(&$ar,$item) 

$ar = array_merge(array_splice($ar,0,$item),array_splice($ar,1)); 


function DownloadFile($filename) { 
if ($this->ChecaReferer() == true) { 
$fil = $this->$path.$filename; 
header("Content-type: application/octet-stream"); 
header("Content-disposition: attachment; filename=".basename($fil)); 
header("Content-Transfer-Encoding: binary"); 
header("Content-Length: ".filesize("$fil")); 
readfile($fil); 
return true; 
} else { 
return false; 




function ChecaReferer() { 
$cont = count($this->lista); 

for ($x=0;$x<$cont;$x++) { 
if (eregi($this->lista[$x],$_SERVER["HTTP_REFERER"])) { 
return true; 
break; 







// Example 
$dow = new D_Security(); // Create new object 
$dow->SetPath("./"); // set the folrder where the files are stored 

$dow->AddHost("www.your-website.com"); // Add host to list 
$dow->AddHost($_SERVER["HTTP_REFERER"]); // Add host to list 

if (!$dow->DownloadFile("example.exe")) { // Download the file 
echo "<br>Error: you are trying to download this file from unauthorized site<br>"; 
echo "Try again from authorized host now: <a href=downloader.php>link</a>"; 
} ?>
04-01-2016, Saat: 00:31
Cevapla



« Önceki Konu | Sonraki Konu »
Konuyu Okuyanlar: 1 Ziyaretçi



Hızlı Menü:

Türkçe Çeviri: MCTR, Forum Yazılımı: MyBB
© 2002-2018 MyBB Group.
Tasarım Tekno Destek Team © 2018