SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist
    Join Date
    Jan 2005
    Posts
    425
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Censoring email from textarea form input

    Using PHP I want to censor out anything that resembles an email address (.com, .co.uk,.com.au,.net,.biz, .us, all possibilities) from a textarea input, called "aboutme".
    If people try and hide the email using common formats like me [at] hotmail [dot] come it would be cool to censor them too but I think that is pushing it as there are limitless ways to hide an email address.

    How would this best be done?

  2. #2
    SitePoint Enthusiast
    Join Date
    Sep 2006
    Posts
    91
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not sure what you mean be censor, but since it's in a form, it sounds like u should process the submitted fields with a regular expression and then do some string manipulation to do what you need to do.

  3. #3
    SitePoint Evangelist
    Join Date
    Jan 2005
    Posts
    425
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I was meaning converting any form email address (domain independent) to ###@####.###

    So:
    test1@hotmail.com will become #####@#######.###
    test2@gmail.com.au will become #####@#####.###.##
    t3@biz.co.uk will become ##@###.##.##
    etc


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •