插件84:保护Email
来源:互联网 发布:mac 下载文件夹 编辑:程序博客网 时间:2024/04/20 09:56
<?php // Plug-in 84: Protect Email// This is an executable example with additional code supplied// To obtain just the plug-ins please click on the Download link$email = 'billgates@microsoft.com';$pemail = PIPHP_ProtectEmail($email);echo "My email address is $pemail";function PIPHP_ProtectEmail($email){ // Plug-in 84: Protect Email // // This plug-in takes an email address and turns it into a // clickable <a href='mailto:...' link using JavaScript // to obfusacte the link when viewed using View | Source, or // if the page is loaded by a spam email harvesting bot. On // success it returns a string containing JavaScript code, or // on failure it returns FALSE. It requires this argument: // // $email: An email address to protect $t1 = strpos($email, '@'); $t2 = strpos($email, '.', $t1); if (!$t1 || !$t2) return FALSE; $e1 = substr($email, 0, $t1); $e2 = substr($email, $t1, $t2 - $t1); $e3 = substr($email, $t2); return "<script>e1='$e1';e2='$e2';e3='$e3';document.write" . "('<a href=\'mailto:' + e1 + e2 + e3 + '\'>' + e1 " . "+ e2 + e3 + '</a>');</script>";}?>
插件说明:
插件接受一个Email地址,返回一段Javascript代码,他把这个地址在HTML页面上显示为一个超链接形式,而不是完整的Email地址。若操作成功则返回这个Javascript程序,若失败(如,这个Email地址无效),则返回false.他需要以下参数:
$email:需要处理的Email
- 插件84:保护Email
- 保护你的email地址。
- 一个Email保护的小工具
- 插件36:验证Email地址
- 保护企业Email 从增强Exchange服务器安全性开始
- commons-email插件发邮件问题总结
- Jenkins常用插件之email-ext
- PHPMailer插件的使用(PHP发送email插件)
- Java环境变量设置
- Ansi、Unicode、UTF8字符串之间的转换和写入文本文件
- JSP获得客服端MAC地址
- oracle 常用数据类型
- java学习笔记《java面向对象编程》——java语言中的修饰符
- 插件84:保护Email
- hash算法及其应用
- 高性能服务器的资源和相关站点
- 经典 SQL Server DBA三十问
- Eclipse3.7中如何集成JBOSS7.0版本
- Android中如何获取当前apn接入点并切换?
- 反射 --- 成员方法Method类的反射
- 安装google输入法
- Octave基础