email-decode.min.js

https://blog.shiniv.com/2016/09/decode-encode-cloudflare-address-obfuscation/

1.源代码就能发现类似如下的代码

<a class=”__cf_email__” data-cfemail=”30515253705152531e535f5d” href=”/cdn-cgi/l/email-protection”>
[email protected]
</a>
<script data-cfhash=”f9e31″ type=”text/javascript”>
/* <![CDATA[ */!function(t,e,r,n,c,a,p){try{t=document.currentScript||function(){for(t=document.getElementsByTagName(‘script’),e=t.length;e–;)if(t[e].getAttribute(‘data-cfhash’))return t[e]}();if(t&&(c=t.previousSibling)){p=t.parentNode;if(a=c.getAttribute(‘data-cfemail’)){for(e=”,r=’0x’+a.substr(0,2)|0,n=2;a.length-n;n+=2)e+=’%’+(‘0’+(‘0x’+a.substr(n,2)^r).toString(16)).slice(-2);p.replaceChild(document.createTextNode(decodeURIComponent(e)),c)}p.removeChild(t)}}catch(u){}}()/* ]]> */
</script>

2.PHP 的方式将这个邮箱地址解密出来

function deCFEmail($encode){
$k = hexdec(substr($encode,0,2));
for($i=2, $m=”; $i < strlen($encode) – 1; $i += 2){
$m.=chr(hexdec(substr($encode, $i, 2))^$k);
}
return $m;
}
echo deCFEmail(“30515253705152531e535f5d”).”\n”;

3.加密的算法

function encodeEmail($email, $key=0) {
$chars = str_split($email);
$string = ”;
$key = $key ? $key : rand(10, 99);
foreach ($chars as $value) {
$string .= sprintf(“%02s”, dechex(ord($value)^$key));
}
return dechex($key).$string;
}

Laravel 支付解决方案之 Laravel Cashier (一)—— 安装配置篇(集成Stripe)

https://xueyuanjun.com/post/1403

Laravel Cashier可以满足你开发支付系统过程中所需要的任何需求。除此之外,它还同步并集成了用户身份验证系统。所以,你不再需要担心如何将计费系统集成到开发中了

https://learnku.com/laravel/t/1340/why-laravel-will-be-the-most-successful-and-popular-php-framework