Jump to content

leave an http request hanging with php


cloudzero

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/67473-leave-an-http-request-hanging-with-php/
Share on other sites

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?

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....

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.