Will Posted February 24, 2008 Share Posted February 24, 2008 All pages on V1 have some script which checks to see if a file exists in the "ipban" folder which is the IP of the users browsing. If so it then blocks them. This tool goes into the admin panel which allows you to add and remove IP bans. In admin.php: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. You need to change the USER NAME part to your hosting username. If you use cpanel it will be that username. Add the cases: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. And the links You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. If you don't have to code to check the ip here it is: For the login + register pages etc: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Put is somewhere near the top. In header.php put it in an appropriate place. Mine is under the crimeexp checking part: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. It is likely you already have the IP checking code there, so check first. It is tested and works, any problems reply to this topic. You need to make the ipbans folder CHMOD: 777 Quote Link to comment Share on other sites More sharing options...
Danny Posted February 24, 2008 Share Posted February 24, 2008 Re: IP Banning tool [v1] nice mod! Quote Link to comment Share on other sites More sharing options...
Ishy Posted February 24, 2008 Share Posted February 24, 2008 Re: IP Banning tool [v1] Nice one. Quote Link to comment Share on other sites More sharing options...
shaved92bravada Posted February 24, 2008 Share Posted February 24, 2008 Re: IP Banning tool [v1] Wish this would have come out sooner lol. Gets tiring having to add the ip's manually. Wow no one has asked for this for V2 yet... Quote Link to comment Share on other sites More sharing options...
Will Posted February 24, 2008 Author Share Posted February 24, 2008 Re: IP Banning tool [v1] Wish this would have come out sooner lol. Gets tiring having to add the ip's manually. Wow no one has asked for this for V2 yet... I think it will work without changes; there are no database functions or full pages. Quote Link to comment Share on other sites More sharing options...
HITMAN 17 Posted February 24, 2008 Share Posted February 24, 2008 Re: IP Banning tool [V1] + [V2] (I think) i was thinking about requesting this know need Quote Link to comment Share on other sites More sharing options...
zbirc3 Posted February 25, 2008 Share Posted February 25, 2008 Re: IP Banning tool [V1] + [V2] (I think) Thank you so much for this modification! I will probably end up using it by tonight anyway. XD Thanks again! Quote Link to comment Share on other sites More sharing options...
Vorless DarkChaos Posted February 25, 2008 Share Posted February 25, 2008 Re: IP Banning tool [V1] + [V2] (I think) do not forget ip banning is not 100% perfect as long they do not change there ip address then they are ban otherwise person can still return Quote Link to comment Share on other sites More sharing options...
zbirc3 Posted February 25, 2008 Share Posted February 25, 2008 Re: IP Banning tool [V1] + [V2] (I think) But it would keep complete n00bs to Internet away ! :D If you know what I mean!? Quote Link to comment Share on other sites More sharing options...
Will Posted February 25, 2008 Author Share Posted February 25, 2008 Re: IP Banning tool [V1] + [V2] (I think) Has anyone tested it on V2? Quote Link to comment Share on other sites More sharing options...
HITMAN 17 Posted February 25, 2008 Share Posted February 25, 2008 Re: IP Banning tool [V1] + [V2] (I think) Warning: fopen(/home/a5069509/public_html/ipbans/77.101.220.73) [function.fopen]: failed to open stream: Permission denied in /home/a5069509/public_html/staff.php on line 30 Quote Link to comment Share on other sites More sharing options...
Will Posted February 25, 2008 Author Share Posted February 25, 2008 Re: IP Banning tool [V1] + [V2] (I think) You didn't change the permissons of the ipbans folder... Quote Link to comment Share on other sites More sharing options...
HITMAN 17 Posted February 25, 2008 Share Posted February 25, 2008 Re: IP Banning tool [V1] + [V2] (I think) nice one works for v2 Quote Link to comment Share on other sites More sharing options...
Krafty Posted February 26, 2008 Share Posted February 26, 2008 Re: IP Banning tool [V1] + [V2] (I think) Here it is converted for V2..Not tested and rushed so sorry. In staff.php, scroll to the bottom and find '}' after it add:: Code: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. You need to change the USER NAME part to your hosting username. If you use cpanel it will be that username. In staff.php find: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Add the following cases : Code: case 'ipban': ipban(); break; case 'ipbancon': ipbancon(); break; case 'ipbanview': ipbanview(); break; case 'ipbanremove': ipbanremove(); break; And the links into smenu.php Code: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. If you don't have the code to check the ip here it is: For the login + register pages etc: Code: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. BUT You should have something like this already in your header.php so check first! Finally, change the permission for the folder: ipbans to 777 so it is completely writeable. I also advise you put a blank index.php / .html / .asp etc. in there so no-one can see what files are in there. Good Luck. Quote Link to comment Share on other sites More sharing options...
zbirc3 Posted February 27, 2008 Share Posted February 27, 2008 Re: IP Banning tool [V1] + [V2] (I think) The topic starter didnt code it properly (sorry), because it said "I" was IP banned... :/ Quote Link to comment Share on other sites More sharing options...
Will Posted February 27, 2008 Author Share Posted February 27, 2008 Re: IP Banning tool [V1] + [V2] (I think) The topic starter didnt code it properly (sorry), because it said "I" was IP banned... :/ Explain Quote Link to comment Share on other sites More sharing options...
GrimReeFer Posted March 4, 2008 Share Posted March 4, 2008 Re: IP Banning tool [V1] + [V2] hey, im trying to get this mod to work on my site, v2, im very new to all the coding business but ive managed to get it added to staff panel, i can go on to view banned ip's but when i go on to ban ip and click ban it says this Warning: fopen(/home/tribalcl/public_html/ipbans/74.86.167.50) [function.fopen]: failed to open stream: Not a directory in /home/tribalcl/public_html/staff.php on line 228 Error Creating File can anyone help please? Quote Link to comment Share on other sites More sharing options...
Will Posted March 4, 2008 Author Share Posted March 4, 2008 Re: IP Banning tool [V1] + [V2] Does the folder exsist? Is the folder CHMOD: 777? Quote Link to comment Share on other sites More sharing options...
GrimReeFer Posted March 4, 2008 Share Posted March 4, 2008 Re: IP Banning tool [V1] + [V2] what file exackly? i remember i made one 777 but i doubt it was the rite one Quote Link to comment Share on other sites More sharing options...
Krafty Posted March 4, 2008 Share Posted March 4, 2008 Re: IP Banning tool [V1] + [V2] well we wouldn't kn0ow would we... whatever file you've chosen as ur ip ban file Quote Link to comment Share on other sites More sharing options...
tittlemouse Posted March 4, 2008 Share Posted March 4, 2008 Re: IP Banning tool [V1] + [V2] thanks this person was really annoying me. when i feded him he just rejoined thanks to thisi can now just ip ban him thanks Quote Link to comment Share on other sites More sharing options...
GrimReeFer Posted March 5, 2008 Share Posted March 5, 2008 Re: IP Banning tool [V1] + [V2] i have 2 files, ipban.php and ipban both as 777 but it says that! edit there both blank folders, should either of them have anything in them? Quote Link to comment Share on other sites More sharing options...
tittlemouse Posted March 5, 2008 Share Posted March 5, 2008 Re: IP Banning tool [V1] + [V2] hi make a folder called ipbans (no caps) and then chomd it to 777 and did you change the username part where it says username Quote Link to comment Share on other sites More sharing options...
Anubis Posted March 6, 2008 Share Posted March 6, 2008 Re: IP Banning tool [V1] + [V2] I'm a little confused at why you would have to use a full link to the ipbans folder in the first place? "You need to change the USER NAME part to your hosting username. If you use cpanel it will be that username." Its possible i am mistaken but wouldnt you be able to just use /ipbans since it is in the public_html folder and not have to mess with using the username? Quote Link to comment Share on other sites More sharing options...
Krafty Posted March 6, 2008 Share Posted March 6, 2008 Re: IP Banning tool [V1] + [V2] Gosh, sum people hey? 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.