• A Great friend to the HardForum with a great kid that he is trying to get a scholorship to continue his schooling. Please give hime a vote! Only 24 hours left! Thanks.
    If you have an VOTE FOR KEENAN!

PHP - Need help banning IP's from a form!

DarkRukia

n00b
Joined
Aug 11, 2005
Messages
59
I want to be able to from a form! Like Just a textbox saying IP: and then you enter it and it adds it to the ipban list or something...any ideas?
 
Well how are you goign to store your ban list? Mysql, text files? You have to add code to the banned pages to compare the client's IP with your ban list that you'll have to read in and act accordingly.
 
I know how to do it without the form....but imagine this...you are making a forum system and everytime someone has to IP ban someone they have to go into ftp and edit one of their php files...how user friendly is that?

So anyway, I would guess a database...as long as no queries have to be run from something like phpmyadmin.
 
Should be pretty easy, assuming you know the basics of connecting to a database with PHP. Just have a table of banned IPs, and add to them whenever the form is called. Make sure you've got strong security on the banform, or you'll be in a world of pain.
 
Back
Top