phpeveryday.com

The best tutorial of php, php framework, php strategies, object oriented oriented,


PHP Email: Protecting Email Address from Spam Collectors

Tag: email, protection, security, spam   Category: PHP Basic
post: 21 Jan 2008 read: 1,350


PHP Email Step By Step Tutorial: Today, many spammers use software that scours websites looking for email address on pages. When found, they will send spam to these addresses. Several way may be can used such as add the text "NOSPAM" into email. In this post, we will use JavaScript as tactic. We convert the entire link into ASCII codes, save them in a JavaScript array, and then use JavaScript to turn it back into HTML.

code for protect from spammers

Create a file named "protected.php" within www/test/email. Enter above code. And test it:

test protected email

When you look source, you will get like this:

protected email


Series this article:
Email: Sending a Simple Email (Part 1)
Email: Sending a Simple HTML Mail (Part 2)
Email: Sending Dual Format (Part 3)
Email: Send Attachement Mail
PHP Email: Using Embedded Images in HTML Email
PHP Email: Sending Mass Email use BCC
PHP Email: Protecting Email Address from Spam Collectors

| Give Your Opinion | Recommend
Share and Bookmark to: These icons link to social bookmarking sites where readers can share and discover new web pages.
digg del.icio.us technorati Ma.gnolia BlinkList

Recommended articles by other readers:
Web Services: How PHP Kiss VB.NET? (Part 1)
Chart: How to Build Cool Animation Real Time Chart
Joomla: Fast Road to Understand Component Programming
Email: Send Attachement Mail
mod_rewrite - Part 1: create your "fantasy" URL

What do You Think?
Your Name *:
Email *:
(Will not be published)
Website/URL:
Your Comment *:
* Required


615
posting