How to stop data copy ?
Started on the old forum in January 2012 · view the original in the archive · old links redirect here
If you provide direct links to files anybody can make a data copier. dont use direct links.
$("#mfreak").find(".head brain").clone();
Progress:
[|||___________________________] : 5%
Output:
Memory limit reached, unable to complete operation.
Support answer:
Try using a super uber strong mega computer to reach at least 10%.
👋
Abe Saale Ek File bana .htaccess Apne Root Folder me jaha Script rakhi hai Aur Ye Code Paste kar de Uss me Aur Save kar dena File Name Sshould be .htaccess
Code is :
ErrorDocument 404 Domain
farukhbhai wrote: Abe Saale Ek File bana .htaccess Apne Root Folder me jaha Script rakhi hai Aur Ye Code Paste kar de Uss me Aur Save kar dena File Name Sshould be .htaccess
Code is :
ErrorDocument 404 Domain
next time write your posts in English
Advertise your mobile site for FREE with AdTwirl
athora wrote: Copyscape Plagiarism Checker - Duplicate Content Detection Software
this one is only for texts and not for files, files can be easily renamed with grabbers.
Advertise your mobile site for FREE with AdTwirl
It called hot link protection
there are several methods of doing this 1. is to not use direct links for example
http://bla.com/files/thebones.gif
that could be http://bla.com/file.php?name=thebones.gif or http://bla.com/file.php?id=1etc
this way you could check a number of things
if this is has not been lead to from your site (referer) then you could just kill the request for example
file.php
<?php
$name = isset($_GET['name']) ? trim($_GET['name']) : null;
if($name===null)
{
die();
}
else
{
if(isset($_SERVER['HTTP_REFERER']) && preg_match("/bla\.com/", $_SERVER['HTTP_REFERER']))
{
if(file_exists("some_directory/$name"))
{
header("location:some_directory/$name");
exit;
}
else
{
die();
// kill file request file does not exists
}
}
}
?>
that example could be altered using a curl request
so there are others ways like using an md5 check some
generating a random key
like $session['key'] = uniqid(); //everytime someone visits the site //store this in datbase and then check upon file downloads
please use your head
antony2kx wrote: It called hot link protection
there are several methods of doing this 1. is to not use direct links for example
http://bla.com/files/thebones.gif
that could be http://bla.com/file.php?name=thebones.gif or http://bla.com/file.php?id=1etc
this way you could check a number of things
if this is has not been lead to from your site (referer) then you could just kill the request for example
file.php <?php $name = isset($_GET['name']) ? trim($_GET['name']) : null; if($name===null) { die(); } else { if(isset($_SERVER['HTTP_REFERER']) && preg_match("/bla\.com/", $_SERVER['HTTP_REFERER'])) { if(file_exists("some_directory/$name")) { header("location:some_directory/$name"); exit; } else { die(); // kill file request file does not exists } } } ?>that example could be altered using a curl request
so there are others ways like using an md5 check some
generating a random key
like $session['key'] = uniqid(); //everytime someone visits the site //store this in datbase and then check upon file downloads
please use your head
nice code example, but you need to extend it, you should enable empty referrer,
also if the referrer url looks like this:
http://another-domain.com/?bla.com
it will be detected as a valid referrer by your code.
Advertise your mobile site for FREE with AdTwirl
GumSlone wrote: nice code example, but you need to extend it, you should enable empty referrer,
also if the referrer url looks like this:
http://another-domain.com/?bla.comit will be detected as a valid referrer by your code.
i understand you completely gumslone using ^ as negation sign will tell the script that the url must look like that from start
edited code
<?php
$name = isset($_GET['name']) ? trim($_GET['name']) : null;
if($name===null)
{
die();
}
else
{
$ref = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ' ';
$host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : ' ';
$pragma = isset($_SERVER['HTTP_PRAGMA']) ? $_SERVER['HTTP_PRAGMA'] : ' ';
if($ref!==' ' && preg_match("/^bla\.com/i", $ref) && preg_match("/^bla\.com/i", $host) && $pragma=='no-cache') // this should prevent it
{
if(file_exists("some_directory/$name"))
{
header("location:some_directory/$name");
exit;
}
else
{
die();
// kill file request file does not exists
}
}
}
?>
Added after 22 minutes:
another way is to use object relation database
for example
creating an instance of a file each time it is request
so a table called
temp_downloads
file_name file_path exp_time link
when user click download link
insert info into temp table
then generate a link to that file
mysql_query("DELETE FROM temp_downloads WHERE exp_time<'".time()."'");
http://bla.com/file.php?link=jdhdjhgd
$link = isset($_GET['link']) ? mysql_real_escape_string(trim($_GET['link'])) : '';
$query = mysql_query("SELECT file_path FROM temp_downloads WHERE link='".$link."'");
if(mysql_num_rows($query)>0)
{
$file_object = mysql_fetch_object($query);
if(file_exists($file_object->file_path))
{
header("location:$file_object->file_path);
exit;
}
else
{
echo "file does not exists";
}
}
else
{
echo "link has expired";
}
after all this then u can pretty the url using rewrite engine
RewriteEngine on
RewriteRule ^file.php?link=([a-zA-z0-9]+)$? file/$1 [L]
tejassoni wrote: thanx buddy. But where place i add dis code ?
my site download file is load.php and file id is load.php?id=2352 etc.
Ahhh come on! Why are you asking for questions when you don't have a clue what to do with the answer?!
This is the ultimate help for you: ULTIMATE HELPER 😛
Well im sorry i cant help anymore, id u dont know where to place this code then, you seriously dont know php at all