/ Published in: PHP
Function for obfuscate Text in html pages. good for making screenshot and mind data protection if needed. changes Text into many small divs with different bgcolor.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function makeTextUnreadable($word,$width=1,$height=3) { $arr=['#ddd','#453','#aaa','#111']; $back = ""; $back .= '<div style="height: '.($height*4).'px;width: '.($width*4).'px;float: left;">'; for($j=0;$j<=$height;$j++) { $back .= '<div style="margin: 0;height: 4px;width: '.($width*4).'px;background-color: '.$arr[rand(0,3)].';"></div>'; } $back .= '</div>'; } return $back; }