The trick is to stop downloads that match certain trigger patterns or to obfuscate the location of required directories. I used to have a script for the former purpose, prolly still do somewhere; here is an example of one for the latter: http://www.hotscripts.com/Detailed/31142.html
Edit: here is a link to a script that works to ban scrapers based upon their behaviour:
http://www.anticrawl.com
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
Order Deny,Allow
Deny from 58.2.0.0 58.2.255.255
Deny from 58.68.0.0 58.68.127.255
Deny from 58.146.96.0 58.146.127.255
(more ips follow after....)
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>Ordering is one of...
Deny,Allow
The Deny directives are evaluated before the Allow directives. Access is allowed by default. Any client which does not match a Deny directive or does match an Allow directive will be allowed access to the server.
Allow,Deny
The Allow directives are evaluated before the Deny directives. Access is denied by default. Any client which does not match an Allow directive or does match a Deny directive will be denied access to the server.
Order Deny,Allow
Deny from all
Allow from test2.comOrder Allow,Deny
Allow from test2.com
Deny from testing.test2.com <Files *>
deny from 58.2.0.0 58.2.255.255
deny from 58.68.0.0 58.68.127.255
deny from 58.146.96.0 58.146.127.255
</Files>
<Files .htaccess>
deny from all
</Files> <Files .htaccess>
order allow,deny
deny from all
</Files>
IndexIgnore */*
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?domain.com/.*$ [NC]
RewriteRule .(gif|jpg)$ - [F]
RewriteRule .(gif|jpg)$ http://www.myartsubmit.com/images/stolen.gif [R,L]

<?php
function getRealIP()
{
if( $_SERVER['HTTP_X_FORWARDED_FOR'] != '' )
{
$client_ip =
( !empty($_SERVER['REMOTE_ADDR']) ) ?
$_SERVER['REMOTE_ADDR']
:
( ( !empty($_ENV['REMOTE_ADDR']) ) ?
$_ENV['REMOTE_ADDR']
:
"unknown" );
$entries = split('[, ]', $_SERVER['HTTP_X_FORWARDED_FOR']);
reset($entries);
while (list(, $entry) = each($entries))
{
$entry = trim($entry);
if ( preg_match("/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/", $entry, $ip_list) )
{
$private_ip = array(
'/^0\./',
'/^127\.0\.0\.1/',
'/^192\.168\..*/',
'/^172\.((1[6-9])|(2[0-9])|(3[0-1]))\..*/',
'/^10\..*/');
$found_ip = preg_replace($private_ip, $client_ip, $ip_list[1]);
if ($client_ip != $found_ip)
{
$client_ip = $found_ip;
break;
}
}
}
}
else
{
$client_ip =
( !empty($_SERVER['REMOTE_ADDR']) ) ?
$_SERVER['REMOTE_ADDR']
:
( ( !empty($_ENV['REMOTE_ADDR']) ) ?
$_ENV['REMOTE_ADDR']
:
"unknown" );
}
return $client_ip;
}
?>
Return to Article Dashboard Site Management
Users browsing this forum: No registered users and 1 guest