|
|
|
-- 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 | |
|
|