ledude Posted March 4, 2014 Share Posted March 4, 2014 Hello, first of all, sorry if i chose the wrong forum to post this, i'm new here. Ok, so, in a short story, i'm not a pro at programming anything, but i have a little game server (open to public) i use to play with friends, and i use an apache website for it aswell. The thing is, the server itself doesn't have an IP ban option on the SQL, but it does use one of the files in my website to load the game files. So, i thought about using .htaccess to IP ban the people i don't want it the server (which would block their access to that file, and open the game), and it worked perfectly. The thing is: manually adding every line from everyone that gets banned would take alot of time (open sql, check ip, open .htaccess, add a line). I already have a php tool for administrators to access and edit a few things, so, what i'd like to know is: Is there any php code that could access (thru that adm managing page, of course) that could add a line to the .htaccess like: 'deny from x.x.x.x', or something similar? This way me, or any other adm would have access to that specific .htaccess and block access from an specific IP. If not, would any of you guys know a solution to my problem? Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/286703-remotely-add-a-deny-line-to-htaccess-with-apache-thru-a-php-code/ Share on other sites More sharing options...
ledude Posted March 6, 2014 Author Share Posted March 6, 2014 No one? Rly? :/ Quote Link to comment https://forums.phpfreaks.com/topic/286703-remotely-add-a-deny-line-to-htaccess-with-apache-thru-a-php-code/#findComment-1471667 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.