| name | language | licence |
|---|---|---|
| delay function | JavaScript | Other |
| RwSetGet | JavaScript | Other |
| Contact Form 1 | PHP | Other |
| Email Obfuscation | PHP | Other |
| MultiSort | PHP | Other |
| Show Recent Posts 2 | PHP | Other |
| JavaScript Compressor - PHP | PHP | GPL 2 |
| officeHours OPEN/CLOSE visitor notification | PHP | Other |
< 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 >
language: PHP
licence: Other
Email Obfuscation
options: view full snippet • send to code collector
<?php
/**
* Generate JS that will render obfuscated email address into the document
* @param string $to the email address
* @param string $subject the subject header
* @param array $attrs optional array of additional attrs for the resulting <a> tag
* @return string the resulting JavaScript
*/
function jsEmail($to, $subject = null, $attrs = array()) {
// Split the email into user name and domain
list($u, $d) = explode('@', $to);
// Form the href attribute
$href = "mailto:$u@$d";
if($subject) {



library
css (23)