-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathobfuscatemailto.php
More file actions
23 lines (23 loc) · 954 Bytes
/
obfuscatemailto.php
File metadata and controls
23 lines (23 loc) · 954 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
function createMailto($strEmail){
$strNewAddress = '';
for($intCounter = 0; $intCounter < strlen($strEmail); $intCounter++){
$strNewAddress .= "&#" . ord(substr($strEmail,$intCounter,1)) . ";";
}
$arrEmail = explode("@", $strNewAddress);
$strTag = "<script language="."Javascript"." type="."text/javascript".">\n";
$strTag .= "<!--\n";
$strTag .= "document.write('<a href=\"mai');\n";
$strTag .= "document.write('lto');\n";
$strTag .= "document.write(':" . $arrEmail[0] . "');\n";
$strTag .= "document.write('@');\n";
$strTag .= "document.write('" . $arrEmail[1] . "\">');\n";
$strTag .= "document.write('" . $arrEmail[0] . "');\n";
$strTag .= "document.write('@');\n";
$strTag .= "document.write('" . $arrEmail[1] . "<\/a>');\n";
$strTag .= "// -->\n";
$strTag .= "</script><noscript>" . $arrEmail[0] . " at \n";
$strTag .= str_replace("."," dot ",$arrEmail[1]) . "</noscript>";
return $strTag;
}
?>