Jump to content


Photo

IP Functions?


  • Please log in to reply
1 reply to this topic

#1 RDKL PerFecT

RDKL PerFecT
  • Members
  • PipPip
  • Member
  • 12 posts

Posted 14 April 2006 - 11:50 PM

So I've found a user's IP and registered as a variable in a DB. Is there any way I can now ban it? Cheers.

#2 Caesar

Caesar
  • Members
  • PipPipPip
  • Advanced Member
  • 1,025 posts

Posted 15 April 2006 - 01:04 AM

Asuming you have already ran the query for the IP, and thrown it into $banned[ip]:

$ip = $_SERVER[REMOTE_ADDR];

if($ip == $banned[ip])

{header("Location: banned.php");}

Of course there is more to it, and diferent methods can be used....this should give you an idea.
PHP Ninja




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users