dev-master
9999999-dev https://github.com/Pfarrer/yii2-email-obfuscatorYii2 extension to obfuscate eMail addresses.
BSD-3-Clause
The Requires
- php >=5.4.0
- yiisoft/yii2 *
by Brian Pfretzschner
email extension yii2 obfuscation obfuscator
Yii2 extension to obfuscate eMail addresses.
Email obfuscatior plugin for Yii2., (*1)
This plugin combines some Email obfuscation technics., (*2)
The Email address "mail@example.com" will result in the following code:, (*3)
<script type="text/javascript"> var action=":otliam".split("").reverse().join(""); var href="znvyrknzcyr.pbz".replace(/[a-zA-Z]/g, function(c){return String.fromCharCode((c<="Z"?90:122)>=(c=c.charCodeAt(0)+13)?c:c-26);}); href=href.substr(0, 4) + String.fromCharCode(4*2*2*4) + href.substr(4); var a = "<a href=\""+action+href+"\">"+href+"</a>"; document.write(a); </script>
The preferred way to install this extension is through composer., (*4)
Either run, (*5)
php composer.phar require "pfarrer/yii2-email-obfuscator" "dev-master"
or add, (*6)
"pfarrer/yii2-email-obfuscator": "dev-master"
to the require section of your composer.json
file., (*7)
Simply insert this in your template:, (*8)
<?= \pfarrer\yii2\email\Obfuscator::widget([ 'email' => 'mail@example.com', ]) ?>
Yii2 extension to obfuscate eMail addresses.
BSD-3-Clause
email extension yii2 obfuscation obfuscator