View Single Post
Old 10-15-2018, 07:38 PM  
HairyChick
Slowly dying
 
Industry Role:
Join Date: Sep 2012
Location: Padanaram
Posts: 3,091
Script Coder Needed For Tiny Script

I had a small script years ago and need it again. It’s only a handful of lines so is tiny to me.

Call the php script up in a browser. Fields to fill in are “IP” and “reason” and “time” and “initials” of person banning

Script writes to htaccess file. Bans IP for REASON for TIME. Like 123.45.678.* for LOGIN HACK ATTEMPT for 1440 minutes (1 day) and INITIALS.

Script has numerical list for minute ban choices
60
120
720
1440
10080
302400
99999999 permanent

* wildcards allowed for D and C, never A and on rare occasions, B.

Ideally, I’d like it to email me the results or just “a ban has been added”. I’ll backup htaccess every tine do if a bad code is added, it can be overwritten until the bad code is identified and why error occurred is done. Also, if new file breaks the site, I can upload the old one fast.

As I reread that, I realized a lot of entries wasn’t called up. If it breaks the site or bans everyone, the latter code is easy to find, but the former is line by line. My host will have fits if the script had many entries.

PM or email purple laptop at the g mail place
__________________
*****************************************
Anti-Semites have Small Penis Syndrome. The only known treatment is electroshock therapy combined with cerebellum removal. Fortunately, it’s a tiny procedure.
*****************************************
HairyChick is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote