Selamlar, mailleri ozgur*****0152@gmail.com şeklinde göstermek için hazır bir kod parçası bulunuyor mu? Aşağıda örnek verebilir misiniz?
Selam
function obfuscate_email($email)
{
$em = explode("@",$email);
$name = implode('@', array_slice($em, 0, count($em)-1));
$len = floor(strlen($name)/2);
return substr($name,0, $len) . str_repeat('*', $len) . "@" . end($em);
}
// to see in action:
$emails = ['"Abc\@def"@iana.org', 'abcdlkjlkjk@hotmail.com'];
foreach ($emails as $email)
{
echo obfuscate_email($email) . "\n";
}