Anti leech scriptler

Web tasarım, Web Programlama ve script dilleri konuları buraya
Cevapla
Kullanıcı avatarı
velociraptor
Yottabyte3
Yottabyte3
Mesajlar: 28418
Kayıt: 14 Mar 2006, 02:33
cinsiyet: Erkek

Anti leech scriptler

Mesaj gönderen velociraptor » 26 Kas 2013, 01:31

varsayalım içeriğinizdeki bir dosya başka bir siteden diekt link verilerek indiriliyor bu durumda ziyaretçi sizin sitenize gelmek yerine o siteden download linkine tıklayıp indirecek ve o site reklam geliri elde ettiği gibi sizin Bandwith inizden gidecek ve emeğiniz sömürülecektir işte aşağıda bunlara çözüm bulmaya çalışan bazı yöntemler

Htaccess

Kod: Tümünü seç

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?sordum\.org/ [NC]
RewriteRule .*\.(zip|exe|rar)$ https://www.sordum.org/ [R,L]
Üsttekinde sordum yerine kendi sitenizin ismini yazınız

Htaccess
http://www.javascriptkit.com/howto/htaccess10.shtml

Kod: Tümünü seç

<?php
/* creates the variable */
$from = getenv("HTTP_REFERER");

/* This will check to see if the variable / URL is valid or not. If it is valid, the page will load!*/
if ($from != "http://www.yourhost.com/page.html") {
/* You can insert a custom error message here */
print("Sorry you have tried to link to a page which does not accept leeching. Click the link below to continue.

<a href=http://www.yourhost.com/page.html>CLICK HERE</a> to enter");
exit;
}

?> 
http://www.oxyscripts.com/php-tutorials ... h-php.html

Marcel Lemmen

Kod: Tümünü seç

<?
/*
Copyright (c) 1999 Marcel Lemmen
E-mail: lemmen@support.nl
All rights reserved.

This code provided "As Is" with no warrantees express or implied.
The author and contributors are not liable for anything good or bad
that results from your use of this code.

You are free to distribute this for free provided this notice is included.
Please forward fixes/enhancements to the
author for inclusion in the next revision.

Usage:
Replace $files with the original with your files.
Replace $filenames with the filename people see when
downloading (CAN be different then file's!!!)
Replace $URL with your directory or the other URL.

That's all!!!

*/

$files=array('file1.zip','file2.zip');
$filenames=array('File1.zip','File2.zip');
$url="/home/lemmen/public_html/data/";
/* When the files are on another server, use the
whole address (http://www.server.com/dir/) in stead of /home/lemmen... */

$referer=ereg_replace("\?.","",$HTTP_REFERER);
$thisfile="http://$HTTP_HOST$PHP_SELF";

if ($referer!=$thisfile)
for ($i=0;$i<count($files);$i++)
echo "<P><A HREF=\"$PHP_SELF?$i\">",$filenames[$i],"</A>\n";

else {
$i=$QUERY_STRING;
$total=$url . $files[$i];
Header ("Content-Type: application/octet-stream");

Header ("Content-Length: ".filesize($total));
Header("Content-Disposition: attachment; filename=$filenames[$i]");

readfile($total);
}
?> 
Steve Oliver

Kod: Tümünü seç

<?php
/*Anti-Leech script by Steve Oliver
 This is the best anti-leech out there.
 No way of telling where the file is coming from.
 Set the 2 variables below, $domain and $folder.
 You can replace the errors below where commented with html files if wanted.*/
//your domain
$domain="www.yourdomain.com";
//folder that the files are in, no lead or trailing slashes
$folder="filefolder";
$filename=stripslashes(urldecode($QUERY_STRING));
//this can be replaced with
//if ($filename==""){readfile("http://www.yourdomain.com/invalidfile.html");exit;}
if ($filename==""){die("<h1>Invalid File Request...</h1>");}
$refr=getenv("HTTP_REFERER");
list($remove,$stuff)=split('//',$refr,2);
list($home,$stuff)=split('/',$stuff,2);
//this can be replaced with
//if ($home!=$domain){readfile("http://www.yourdomain.com/leecher.html");exit;
if($home!=$domain){die("<h1>Leecher!</h1>This file is from $domain");
}else{
$fp=@fopen("http://".$domain."/".$folder."/".$filename,"r");
if($fp){
if (ereg(".mp3",$filename)){$xtype="audio/mpeg";}
elseif(ereg(".zip",$filename)){$xtype="application/x-zip-compressed";}
elseif(ereg(".exe",$filename)){$xtype="application/x-msdownload";}
else{$xtype="application/octet-stream";}
Header("Content-Type: $xtype");
Header("Accept-Ranges: bytes");
Header("Content-Disposition: ; Filename=$filename");
readfile("http://".$domain."/".$folder."/".$filename);
}else{
//this can be replaced with
//readfile("http://www.yourdomain.com/filenotfound.html");exit;
die("file not found");
}}
?>
Diğer bir php scripti:
http://safalra.com/programming/php/prevent-hotlinking/
ve bir başkası
http://www.devshed.com/c/a/PHP/Optimize ... -in-PHP/1/
ve belirli bir sürede belirli tıka izin veren bir diğeri
http://board.phpbuilder.com/showthread. ... st10339431
dosya yolunu gizleyen bir diğer
http://www.tutorialchip.com/php-downloa ... /#tab-demo
diğeri
http://www.icemelon.com/tutorials/14/Pr ... inking.htm
diğeri
https://forums.digitalpoint.com/threads ... ch.101263/
açık kaynak kodlu bir diğeri
http://sourceforge.net/projects/phpanti-leech/
Knowledge determines destiny, And ye shall know the Truth and the Truth shall make you free



Cevapla