WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDES  |  PHP CLASSES  |  CODE SEARCH  |  ARTICLES SEARCH  |  PHP FORUMS  |  PHP MANUAL  |  PHP FUNCTIONS LIST  |  WEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
WeberDev's Monthly code contest PHP Code Contest
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Index
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
Mobile Dev World

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : Protect your email links from being spidered by spam email robots!
Categories : PHP, Security, Mail, Email Click here to Update Your Picture
Ulrich Kapp
Date : Mar 12th 2002
Grade : 3 of 5 (graded 2 times)
Viewed : 8151
File : No file for this code example.
Images : No Images for this code example.
Search : More code by Ulrich Kapp
Action : Grade This Code Example
Tools : My Examples List

  Submit your own code examples 
 

-- START file otliam.php --
<?
$to = $HTTP_GET_VARS["to"];



/*
Configure the variables and case options
*/
$domain = "mycompany.com";

switch ($to) {
        case "info":
                $addr_info = "MyCompany, Inc.";
                break;
        case "webmaster":
                $addr_info = "To the Webmaster";
                break;
        case "name":
                $addr_info = "Surname I. Name";
                break;
/*
and add as many case options as you want here.
*/
        default:
                $addr_info = "mailto.php configuration error";
                $to = "webmaster";
}



/* send the mail header */
header ("Location: mailto:$addr_info <$to@$domain>");
?>
-- END file otliam.php --
Save this as 'otliam.php' or anything else.


In your page, instead of using

<a href="mailto:name@mycompany.com">Send a email to: Surname I. Name</a>

which can be spidered by any email spam robot include the following link to your
page (example):

<a href="otliam.php?to=name">Send a email to: Surname I. Name</a>



Protect your mailto: email addresses from bots - pure PHP
Categories : PHP, Email, Security
send_mail function to defeat Header Injection Hacking/Spamming
Categories : PHP, Email, Form Processing, Security
Encoding data using PGP via PHP's proc_* functions
Categories : Cryptography, Security, Email, PHP, PGP
A damaged image generator (class) for validating text. CAPTCHA - Completely Automated Public Turing test to tell Computers and Humans Apart
Categories : PHP, PHP Classes, Security, GD image library, Security
send php mail with form data and attachment.
Categories : PHP, Email, Mail, Form Processing
Password protection for Phorum 3.1.x with userlevels and log.
Categories : PHP, MySQL, Authentication, Security
IP Blocking
Categories : PHP, Security, HTTP
Session Validation Methods (Security Checks)
Categories : PHP, Sessions, Security
Securing Web Forms with Simple PHP-CAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart)
Categories : PHP, Security, GD image library, Sessions
Solution to those 'tell-a-friend' type email issues
Categories : PHP, Email, Databases, MySQL
Dynamic Image Authentication System in Signup Pages (CAPTCHA)
Categories : PHP, Security, GD image library
PHP3: Formmail. Just a cgi formmail, but than in PHP. It is easy to use!
Categories : HTML and PHP, Email, PHP, Perl, HTML and PHP
phpEasyMail: An easy way to send data from HTML-forms via EMail.
Categories : Email, HTML and PHP, Complete Programs, PHP
Password reminder
Categories : PHP, PHP Classes, Databases, MySQL, Mail
Anti SQL injection-PHP
Categories : PHP, MySQL, Security