I'm allowing users to post messages on my site but there are certain things I want to look for in the message:
E-mail address
Phone numbers
Addresses
Curse words
Does anyone know of such an API or function calls to accomplish this task?
Message Validator
Moderator: General Moderators
-
maneetpuri
- Forum Commoner
- Posts: 60
- Joined: Tue Oct 07, 2008 6:32 am
Re: Message Validator
Hi,
I am not sure if there is any API available for it, but its very simple and you can code it. You will have to design a form with these fields, which when submitted will be stored in the database and on the message board pick this from the database and display them
Hope this helps.
Cheers,
~Maneet
I am not sure if there is any API available for it, but its very simple and you can code it. You will have to design a form with these fields, which when submitted will be stored in the database and on the message board pick this from the database and display them
Hope this helps.
Cheers,
~Maneet
Re: Message Validator
What I'm actually looking for is something that checks for these things and throws an error if these things exist in a message.
Does this help?
Does this help?
- The_Anomaly
- Forum Contributor
- Posts: 196
- Joined: Fri Aug 08, 2008 4:56 pm
- Location: Tirana, Albania
Re: Message Validator
I'm sure it'd be pretty slow, but I'm sure you can use some regex and string functions to check for it all. Check out the preg_* and str* functions, and learn some regex.