Buy Now
Sign in

Simple php code for banned words in textarea [EXTENDED]???

PePa , November 17 2018, 16:41
P
PePa 6
November 17 2018, 16:41 #381563
Hi there,
i am using CF5 on my site and its a great tool. Thanks for giving that away for free use...
Now, due to a lot of spam postings on my site i am searching for a better way to not let spammers or bots enter any "bad words" on my sites contact form that i´ve created with CF5.
During my investigation here on the forum i found this post here that talks about that issue as well (within CF4):
http://www.chronoengine.com/faqs/2626-how-can-i-ban-some-[color=#a333c8
Well the solution posted there already seemed what i was searching for except ONE real horseshoe: the "bad" words have to be implemented into this script, which could end up in a real drag editing it when more than a couple of bad words have to be entered there (lets say you have a bad word list of 200 Words)!
So my question here is:
is it possible to extend this script by processing an external text-file instead of entering the bad words one-by-one into the script itself?
(e.g. a "bad-words.txt" file) handled the same way by the "$ban_array"
Maybe it would look like this a bit:

$ban_array = text( "ban_words.txt");
I know that above is wrong and sounds maybe stupid but i am no real php-programmer so i just understand a bit of that code.
Could someone help me please? How do i integrate an external textfile to be processed by the $ban_array string to keep out bad words from my contact form??
Thanks in advance, any help is apprechiated!
PePa
healyhatman 7
November 18 2018, 13:55 #381566
Yes you can do it, you'll have to google and learn how to read text files in PHP or pay someone to do it.
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store