Advertisement
lamhottt

Sensor Email Function PHP

Aug 10th, 2017
460
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.35 KB | None | 0 0
  1. // Function ini berguna untuk sensor email misalnya, email -> saya@gmail.com,
  2. // menjadi sa**@gmail.com
  3. function _sensorEmail($email,$sensor_text="***")
  4. {
  5.         $f1   =  strpos($email, "@");
  6.         return     substr_replace(substr($email, 0,$f1),$sensor_text,floor( strlen(substr($email, 0,$f1)) / 2), strlen(substr($email, 0,$f1)))."@".substr($email, $f1+1);
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement