• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 164
  • 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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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