I wasn’t even sure on how to apply your script and yes I wanted to write in between the Files tags.
<Files>
// Add line
// Add another line here when when user triggers <blockquote>the too many attempts on login form</blockquote> script
</Files>
I’m not asking for the whole script, just the part on how to write in between the two tags is all. Again I apologize for any communication confusion. Also yes the script will also eventually be able to delete with a form of some type reading the string of their IP, matching that string in the file and removing the whole line attached to it ($match). I’m hoping this isn’t confusing you at all. Write now the way I have it setup here is as follows.
[php]
$HTAfilename = $_SERVER[‘DOCUMENT_ROOT’] . “/.htaccess”;
$HTAhandle = fopen($HTAfilename, “a”);
$HTAcontent = “” . “\n” . "deny from " . $_SERVER[‘REMOTE_ADDR’] . “\n” . “”;
fwrite($HTAhandle, $HTAcontent . “\n”);
fclose($HTAhandle);
header( “Location: index.php” );
[/php]
Results are as follows :
<Files loginform.php>
deny from 127.0.0.1
</Files>
// Add when my script is triggered again
<Files loginform.php>
deny from 555.5.5.5
</Files>
// Add when my script is triggered again
<Files loginform.php>
deny from 222.2.2.2
</Files>
// And so forth and so on
I mean this works as it is but I’m not sure if this is more work on the server or if just calling the tags once and writing in between more work. Your input on that would be great as well. Again I do appreciate your time m@tt. If you have something more clever on the idea I’m more than happy to hear it out, though.