cloudzero Posted August 31, 2007 Share Posted August 31, 2007 so spammers have been hitting my site using php, is there a way to just stop responding to the spammer? instead of banning their ip and returing a 403, i want to just leave them hanging, and let them wait forever for the site to respond. can this be done in php? i know exactly which visitors are spammers. unless you guys can suggest a more malicious way to deal with them using php i would like to hear it too ideally i would like to get them to stop hittng my site because it is screwing up my stats and logs, even the 403 connections are logged Quote Link to comment https://forums.phpfreaks.com/topic/67473-leave-an-http-request-hanging-with-php/ Share on other sites More sharing options...
lemmin Posted August 31, 2007 Share Posted August 31, 2007 You could Redirect them to an endless loop. You could increase the max execution time, too, so that they don't see that error after 30 seconds. Quote Link to comment https://forums.phpfreaks.com/topic/67473-leave-an-http-request-hanging-with-php/#findComment-338740 Share on other sites More sharing options...
cloudzero Posted August 31, 2007 Author Share Posted August 31, 2007 wouldn't that lagg my server? Quote Link to comment https://forums.phpfreaks.com/topic/67473-leave-an-http-request-hanging-with-php/#findComment-338769 Share on other sites More sharing options...
lemmin Posted August 31, 2007 Share Posted August 31, 2007 Probably. You could try to make some kind of connection to a irresponsive host, that would be pretty laggy. Quote Link to comment https://forums.phpfreaks.com/topic/67473-leave-an-http-request-hanging-with-php/#findComment-338775 Share on other sites More sharing options...
cloudzero Posted August 31, 2007 Author Share Posted August 31, 2007 the spammer is using this useragent "Microsoft URL Control - 6.00.8862" i've tried using header to redirect it to a 100 meg file on another domain, but it doesnt seem to work so i think it just reads all responeses in text format, inlcuding its headers i think the best way is to ignore or delay response any solution? Quote Link to comment https://forums.phpfreaks.com/topic/67473-leave-an-http-request-hanging-with-php/#findComment-338780 Share on other sites More sharing options...
cloudzero Posted September 3, 2007 Author Share Posted September 3, 2007 no other suggestions? Quote Link to comment https://forums.phpfreaks.com/topic/67473-leave-an-http-request-hanging-with-php/#findComment-340840 Share on other sites More sharing options...
corbin Posted September 3, 2007 Share Posted September 3, 2007 if(the user is bad) { //not sure how you would check this while(1 != 2) { sleep(3600); } } That should delay them infinitely without much of a hit to your server, although it would leave scripts running and might make apache create more threads and some other weird side effects.... Quote Link to comment https://forums.phpfreaks.com/topic/67473-leave-an-http-request-hanging-with-php/#findComment-340941 Share on other sites More sharing options...
trq Posted September 4, 2007 Share Posted September 4, 2007 If your on a linux server and have the access you could add them to a black list via iptables. This will leave them hanging with no response. Quote Link to comment https://forums.phpfreaks.com/topic/67473-leave-an-http-request-hanging-with-php/#findComment-340987 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.