Jump to content

Blocking IP addresses


primefalcon

Recommended Posts

I'm trying to set it up so I can block certain ip addresses from submitting on a form I have:this is the code

<?php/*List of banned ip addresses*/$banned  = array("##.##.##.##","##.##.##.##","##.##.##.##");/*current user ip lookup/*$userip = $_SERVER['REMOTE_ADDR'];/*comparing users ip to banned list*/if($userip == $banned[""]){ 	echo "<br/><br/><center>You have been banned from submitting entries</center>";	exit(); }?>

I cant seem to get this thing working right

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...