If you're running on CFMX you can do this without a custom tag:

<!--- sleep time in milli-seconds --->
<cfset sleepTime = 5000>
<cfset createObject("java","java.lang.Thread").sleep(sleepTime)>

Spiie

Kym Kovan wrote:
> Hi Paul,
> 
> 
>>We've just had one of our sites 'stolen' by someone in the philipines using
>>an application called iCollect... I got tracert logs etc and will be
>>following up on this....
>>
>>In the meantime, does anyone know of any IP / USER_AGENT filters that I can
>>just drop into an application file so that it protects sites against this
>>sort of thing....
>>
>>If not, I'm thinking about writing something that will do this so that I can
>>protect all the sites that we host using CF and I'd like opinions on how I
>>would go about implementing it...
> 
> 
> The problem is telling the "site stealers" from the, normally legitimate, 
> search engines, they can both hit a site pretty hard and affect its 
> performance. What you need to do is slow down engines which are hitting the 
> site too hard to a degree that they do not affect the sites overall 
> performance. Banning an IP address is trickier as they can jump about and 
> some hard-hitting search engines use an entire /24 IP address block!
> 
> Fortunately the major search engines define themselves quite well in the 
> user-agent string so anything that is hitting the server hard that is not one 
> of those strings can be considered suspicious.
> 
> As you suggested what you need is a tool that:
> 
> looks at the hit rate for a particular user-agent/IP address combination;
> compares that with a definition in a server-scope data array;
> if appropriate delay the page hit.
> 
> The is a very useful CFX custom tag, CFX_Sleep, that just pauses for a 
> defined time with virtually no CPU overhead so applying that for "bad" page 
> hits would either make the site crawling engine go away or at least stop it 
> overloading the server. Rolling the whole thing into a custom tag sitting in 
> application.cfm would not be a hard task.
> 
> 
> --
> 
> Yours,
> 
> Kym 
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Silver Sponsor - RUWebby
http://www.ruwebby.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186229
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to