Page 1 of 1

Unusual - I want to Slow down page laod

Posted: Fri May 26, 2006 1:12 pm
by chinnybeard
I want to slow down the page laod on one of my pages. An unusual request I kow, but I want to make sure that one IP address in particular finds browsing through my site annoying.

I don't want to ban the IP address, else the person will simply use a proxy. I want the person to think that all is fine and its prolly just the server thats slow.

Is there anyway that I can do this using PHP?
I'd be looking for a load time of around 2 - 5 minutes.

Posted: Fri May 26, 2006 1:17 pm
by Luke
run some sort of loop

Code: Select all

if($_SERVER['REMOTE_ADDR'] == 1.1.1.1){
    while($something that takes a while){
        // don't let page load
    }
}

Posted: Fri May 26, 2006 1:38 pm
by cdwhalley
Also, you could use the sleep() function.[/url]

Posted: Fri May 26, 2006 1:41 pm
by RobertGonzalez
How about putting up a script that has endless form data collection that keeps posting back to itself. Something like 'You are on step 1 of 5328 steps'. And have it set up where when you get to like step 30, it automatically errors and starts back at 1 again. Then he'll never get into your site. Of course, this should be coupled with the if check that Ninja posted. But this fakes a time consuming task so that the user may not suspect that he is being harassed when in fact he is.

Posted: Fri May 26, 2006 1:46 pm
by PrObLeM

Code: Select all

echo "<script type='text/javascript'>
if('" . $_SERVER['REMOTE_ADDR'] . "' == '1.1.1.1') {
for(i=0;i<200;i++) {
alert('sup ladies');
}
}
</script>";