Email address protection, Opinion

Posted on 2009-04-20
Last Modified: 2013-12-12

I have a spot on my site that has the contact information of the client.

Do you think that I should protect their email by making it an image or create a online form that they can fill out to submit any comments.

If you think image then do you know where I could find some php info on how to create that.

If you think form, thanks for the info, I know how to do that one.

Question by:movieprodw
    LVL 10

    Accepted Solution

    To be completely honest, I'd suggest you don't display an email address at all, but provide some means of contacting their email address if required.

    You have a few options if you really want to display their address, either creating an image with GD or a simple text replacement method, such as:

    The below example will read:
    Email: your (hypen) name (underscore) 23 (at) them (dot) com

    ^ Similarly to that of reference
    // Set email address
    $email = "";
    // Set replacement array
    $replace = array(
    // Set replacement value array
    $with = array(
        " (dot) ",
        " (at) ",
        " (hyphen) ",
        " (underscore) "
    // Replace occurrences of replacement array with replacement value array
    $new_email = str_replace($replace, $with, $email);
    // Print address
    print("Email: " . $new_email);

    Open in new window

    LVL 1

    Author Closing Comment

    Great that is what I wanted to know!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    A colleague recently asked me about how to give his client a small part of the web site that could be completely under the client's control.  Since I have done this sort of thing before to add emergency banners to a web site, I decided I would creat…
    Both Easy and Powerful How easy is PHP? (  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now