lore_lanu Posted August 13, 2009 Share Posted August 13, 2009 Hey all! So, I am currently working on the backend of my site and I was wondering how I would be able to do something. I would like to enter a string (in this case, an IP address) into a form and have the form add deny from xxx.xxx.xxx.xxx to an htaccess file. (to ban the IP) And, to enter the address into a different form and have it search the .htaccess file and delete the line with the IP address entered. (to unban the IP) How could I accomplish this? I'm pretty sure this is possible to do, but is it the most efficient way to ban an IP Address? Would I better off, storing the banned addresses in a database and then deleting them from the mysql row? That seems a little less efficient to me. Thanks in advance for any help and/or advice! Link to comment https://forums.phpfreaks.com/topic/170170-edit-add-to-and-delete-from-a-certain-file/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.