In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how PHP uses asterisks to hide user names, mobile phone numbers and mailboxes". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "PHP how to hide user names, mobile phone numbers and mailboxes with asterisks."
A simple and practical PHP uses asterisks to hide user names, mobile phone numbers and mailboxes, and replaces some of the users' text messages with asterisks in order to protect users' privacy.
Hide function:
Function hideStar ($str) {/ / username, mailbox, mobile account middle string to * hide if (strpos ($str,'@') {$email_array = explode ("@", $str); $prevfix = (strlen ($email_array [0]) < 4)? "": substr ($str, 0,3); / / mailbox prefix $count = 0 $str = preg_replace ('/ ([\ d\ winters -] {0100}) @ /','* @', $str,-1, $count); $rs = $prevfix. $str;} else {$pattern ='/ (1 [3458] {1} [0-9]) [0-9] {4} ([0-9] {4}) / iTunes; if (preg_match ($pattern, $str)) {$rs = preg_replace ($pattern,'$1 million, $str); / / substr_replace ($name,'****',3,4) } else {$rs = substr ($str, 0,3). "*". Substr ($str,-1);}} return $rs;}
Test data:
Display the instance with an asterisk *:
Account mailbox mobile phone here, I believe you have a deeper understanding of "how PHP uses asterisks to hide user names, mobile numbers and mailboxes". You might as well do it in practice! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.