I've got a website where members are allowed to post classified ads. I want to make sure that spam bots don't harvest their e-mail addresses when they add their contact information. I know how to prevent them from harvesting the e-mail address, but can't figure out how to search their text for an e-mail address.
How do I find an e-mail address from within text using PHP?
Every email address has the @ symbol. What I would do is search for that, and if found parse the string before and after @ until you find a space. If the text to the right of @ looks like a domain, then you can probably bet its an email address. I can't think of any other ways to search for them offhand.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment