- Readme First! - Read and follow the rules, otherwise your posts will be closed
There are currently, 51 guest(s) and 0 member(s) that are online. You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Suggestion: email addy obfuscation [ ]
Author
Message
oldmoney
Private
Joined: Sep 03, 2003
Posts: 39
Posted:
Thu Sep 04, 2003 9:27 pm
This is what I'm using... perhaps it could be added to all email addy calls in a future version of bNC.
function hex_conv($email) {
// converts string to hexidecimals
$encoded = bin2hex($email);
$encoded = chunk_split($encoded, 2, '%');
$encoded = '%' . substr($encoded, 0, strlen($encoded) - 1);
return $encoded;
}
function conv_email($email) {
// creates an anchor tag for emails that is hopefully
// unreadable by spam spiders.
$hex_email = hex_conv($email);
$email = ereg_replace ("@", " AT ", $email);
$email = ereg_replace ("\.", " DOT ", $email);
return "<a href=\"mailto:" . $hex_email . "\">" . $email . "</a>";
}
Zhen-Xjell
Nuke Cops Founder
Joined: Nov 14, 2002
Posts: 5939
Posted:
Fri Sep 05, 2003 3:45 am
I like.
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de ] [en ] [wiki ]
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum