View Full Version : Blocking A computer.

02-09-2006, 01:35 PM
How can I make it so if a certain computer(s) come to my website they will re-directed to a certain page? The person that I want to do this with has a router, so he has a different IP adress every time he turns it off then back on.

Is this still possible though? :confused:

02-09-2006, 02:18 PM
there is some possibilities, the most simple is probably using a cookie.

//if user visits your site and performs something that is not allowed
setcookie("banned", 1);

and when he comes back, you just check his cookie

echo"Go to hell";

02-09-2006, 02:44 PM
Depends on how you define certain computers. Do you mean by IP Address? If so you would need to know the IP and if it was unique incase you block a group of users.

02-09-2006, 04:09 PM
the script dosent seem to be setting cookes tho

02-09-2006, 05:03 PM
It is not really possible to do it. For all means of blocking someone I know I also know how to bypass it.

That cookie will expire when the browser closes.

02-09-2006, 05:12 PM
How can I make a cookie that dosent expire then?

02-09-2006, 05:13 PM

02-09-2006, 05:28 PM
ok, I have:

$value = 'cookie_stuff150964';

setcookie("cookie_stuff150964", $value, time()+60*60*24*30, "/main", ".blue-pelican.net"); /* expire in 30 days */

An then on my homepage I have:


echo"You have been banned";


It's not working though.... :confused:

Do I have to create a file or something?

02-09-2006, 10:20 PM
Of course since the cookie is on their computer they can easily delet it. They may even have their computer set to not save it in the first place.

The web is basically anonymous so you can't guarantee that you can identify the same person a second time.

02-09-2006, 11:30 PM
Hmm, well, id kinda like to beable to set cookes anyway, I could do a lot.

Is there anything wroung with the script that I posted the last post I made?

02-10-2006, 10:04 AM
you could block the subnet?
Any address that includes 111.111.111.xxx (ip address of user you want out)
get redirected.
Although if they really want to get in they could easily get onto a proxy.
or use a public computer.
it really isnt possible to stop somebody getting to your page without blocking everyone else.

02-10-2006, 06:45 PM
Ok, well, now I just want to be able to know how to set cookies.

02-10-2006, 07:56 PM
Read this (http://www.joe2torials.com/view_tutorial.php?view=64).