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.
Unusual - I want to Slow down page laod
Moderator: General Moderators
-
chinnybeard
- Forum Newbie
- Posts: 1
- Joined: Fri May 26, 2006 1:07 pm
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
}
}- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
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.
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>";