chris_rulez001 Posted July 25, 2007 Share Posted July 25, 2007 hi, using php how can i make it so if the user is under 13, it makes their ip address disabled? im making a forum hosting service and i need to know if this is possible, is it? is my request misleading? if yes i will try to make it simpler if you ask. Quote Link to comment Share on other sites More sharing options...
trq Posted July 25, 2007 Share Posted July 25, 2007 You can ban by ip but its not at all reliable. IP addresses change all the time. Besides, you need to get your users to admit to being under 13. Quote Link to comment Share on other sites More sharing options...
Fadion Posted July 25, 2007 Share Posted July 25, 2007 You have this code in the code library of php freaks: Description: Simply add this to any page that you wish that you want to block that ip address from. It will echo "Site Down" to the user who's ip address is banned. This comes in helpful if you want to trick the user into thinking the site is up, but just down. Simply put <?php include 'banned.php';?> (or the name of what name your file would be in any page that you wish to block that ip. Enjoy <? $blockip = array("192.169.1.1"); $x = count($blockip); for ($y = 0; $y < $x; $y++) { if ($REMOTE_ADDR == $blockip[$y]) { echo ("Site Down"); Exit;} } ?> Quote Link to comment Share on other sites More sharing options...
chris_rulez001 Posted July 25, 2007 Author Share Posted July 25, 2007 ok thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.