Click here to Skip to main content
15,885,216 members

Comments by Peter_in_2780 (Top 200 by date)

Peter_in_2780 28-Feb-24 5:04am View    
My first thought when I saw the original question was "Ask ChatGPT!"
Peter_in_2780 6-Feb-24 4:55am View    
:) Thanks, Carlo.
Peter_in_2780 6-Feb-24 4:54am View    
Yes that would work, and so would including a trailing space in the match string if you want to stick with str_replace.
Your choice really comes down to what you want to do with edge cases, like a "word" starting with I, or the roman number at the start or end of input, and so on.
Peter_in_2780 5-Feb-24 19:21pm View    
Deleted
I haven't tried it, but I'd guess it is searching for first match, so try putting your longer keys before any of their prefixes.
Peter_in_2780 4-Feb-24 22:56pm View    
I presume that in the real world, there is an external IP address/port - the one you want to block - where you have "my ip address:60477".
Also, are you already running any apache* filters in fail2ban? Adding a line to one of them would be the easiest way to go.