• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 167
  • Last Modified:

Email address protection, Opinion

Hello,

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.

Thanks!
0
movieprodw
Asked:
movieprodw
1 Solution
 
PhatzerCommented:
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 PHP.net reference
// Set email address
$email = "your-name_23@them.com";
 
// 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

0
 
movieprodwAuthor Commented:
Great that is what I wanted to know!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now