
![]() |
bhcentral
There are certain scrapers and such that like to pillage my pages.
Rather then give them a page not found or something like that which doesn't seem to slow them down much, I would like to make the connection drag on and on and on and then eventually time out. Anyone have any idea how you would do this programatically in .net? Thread.sleep maybe?perkiset
Very curious why you'd do that, but the simplest way would be to watch the inbound IP ($SERVER['REMOTE_HOST'] I think) and if it matches what you want to delay, simply say "sleep(30)" which will cause <this connection> to go to sleep for 30 seconds. That will put no workload on your server, yet delay things quite a bit. CAVEAT: if you are getting slammed by the spiders and many come all at once, and you have a limit to how many
Apacheinstances can be running, then you just built a framework for a self-induced DDOS attack.So wrapping up, I s'pose I wanna ask again - WTF do you want to do that? emonk
I second what perk said, with the added caveat that most unix-likes (
Linux ![]() nutballs
another option is send them slot of irrelevant shit seeded with your links as many ways as you can, trying to get past their cleaner routines. Or to echo the comments, just response.end and move on.
bhcentral
Not using
Apache...Using IIS. thread.sleep works...but I'm not a big fan of that many threads sleeping.Side note...once your connection times out a crawler it stops...almost immediately. VERY effective. As for the reason ![]() |

Thread Categories

![]() |
![]() |
Best of The Cache Home |
![]() |
![]() |
Search The Cache |
- Ajax
- Apache & mod_rewrite
- BlackHat SEO & Web Stuff
- C/++/#, Pascal etc.
- Database Stuff
- General & Non-Technical Discussion
- General programming, learning to code
- Javascript Discussions & Code
- Linux Related
- Mac, iPhone & OS-X Stuff
- Miscellaneous
- MS Windows Related
- PERL & Python Related
- PHP: Questions & Discussion
- PHP: Techniques, Classes & Examples
- Regular Expressions
- Uncategorized Threads