|
|
|
Use this function to hide an e-mail address from spam-bots on your website. Use this function to convert the e-mail address into Unicode values and add the html tag and optional extra e-mail info like subject and body text.
| <?php
function hide_mailto($mail, $label, $subject = "", $body = "") {
$chars = preg_split("//", $mail, -1, PREG_SPLIT_NO_EMPTY);
$new_mail = "<a href=\"mailto:";
foreach ($chars as $val) {
$new_mail .= "&#".ord($val);
}
$new_mail .= ($subject != "" && $body != "") ? "?subject=".$subject."&body=".$body : "";
$new_mail .= "\">".$label."</a>";
return $new_mail;
}
// usage example: echo hide_mailto("you@yourmail.com", "Send a Mail", "Your subject...", "The mail text...");
?> | |
Live example here: http://www.finalwebsites.com/classes/examples/hide_mailto.php |
|
| 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 | | | PHP3 PHP POP3 SMTP MAIL Categories : PHP, Email, HTML and PHP | | | PHP MultiList Mailing List Manager Categories : Email, HTML and PHP, PHP | | | phpEasyMail: An easy way to send data from HTML-forms via EMail. Categories : Email, HTML and PHP, Complete Programs, PHP | | | a function that builds an HTML select list from any mysql table. Categories : PHP, MySQL, HTML and PHP | | | Tag content retrieval from websites with preg_match Categories : PHP, Regexps, Arrays, HTML and PHP | | | Message of the Day - Random Message (Needs MySQL!) Categories : Databases, HTML and PHP, PHP, MySQL | | | Check parameters validity. Paranoia was designed to check the validity of the parameters that a php page will receive after a form submission. It can be used to check the variables sent by POST or GET Categories : Algorithms, HTML and PHP, PHP, Variables | | | email new items in db Categories : PHP, Email, Databases, MySQL, Beginner Guides | | | Alternating background color for HTML table rows Categories : PHP, Databases, MySQL, HTML and PHP | | | Constantly refresh your PHP/HTML page data. Categories : PHP, HTML and PHP, Sybase | | | background music script for random notes in a frame Categories : PHP, Content Management, HTML and PHP | | | A very simple way to build and do a hierarchical html categories browser without javascript , just using html php and mySql
Categories : HTML and PHP, Databases, Algorithms, PHP, MySQL | | | Random Image Display Categories : PHP, Filesystem, Graphics, HTML and PHP | | | PhpView 0.1 - simple php viewer, using temporary files and frames.
Categories : PHP, PHP Options and Info, Debugging, HTML and PHP | |
|
|
|