Created
March 27, 2013 18:18
-
-
Save jimbocoder/5256721 to your computer and use it in GitHub Desktop.
Me breaking all the rules.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This function steganographically (kinda) encodes the iso language code into a gmail email address. | |
// dot characters are used because gmail ignores these when routing mail, but we can still write gmail filters based on them. | |
function langemailification($lang) { | |
global $multiplexer_email; // I'm so sorry. I learned it from watching YOU. | |
list($user,$host) = split('@', $multiplexer_email); | |
// Break the user part of the email address into two parts: the first character, and the remainder. Call them A and B. | |
// We'll insert our dots 1) between A and B, and 2) after B. | |
// Like so: [email protected] | |
list($a,$b) = array( | |
substr($user,0,1), | |
substr($user,1) | |
); | |
// Example return for $lang == 'es': | |
// langua e gecsrs s @gmail.com | |
// return "[email protected]"; | |
return $a . abc_to_dots($lang[0]) . $b . abc_to_dots($lang[1]) . "@$host"; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment