This article brings you the content is about how to get the mobile phone number and IP address of PHP, there is a certain reference value, the need for friends can refer to, I hope to help you.
Provides various official and user-released code examples. For code reference, you are welcome to learn about the weather, online computing, Domain Name Information Query, ip address attribution, and mobile phone number attribution.
At this point, the interfaces provided on the http://api.ajaxsns.com/have basically been completed by me. Record the remaining inte
Code for obtaining the mobile phone IP Address:
public static String getLocalIpAddress(){try{ for (Enumeration
However, in 4.0, an IP address similar to fe80: b607: f9ff: fee5: ipve is displayed. This is an IPV6 address. We need t
Today, the use of Android phones to the virtual machine on the Ubuntu built on the Nginx and rtmp server push things, how can not be pushed up.Later in CMD under Windows:# adb Shell# ping 192.168.0.56Simply ping the IP of the virtual machine, found that the virtual machine's IP and Windows host IP is no longer a network end, so how can not ping pass.It was later
1 first to import these header files in the current class:#include #include #include #include #import 2 implementation of the specific code:Get the IP address of the phone's network-(NSString *) getipaddress{BOOL success;struct Ifaddrs * ADDRS;const struct IFADDRS * CURSOR;Success = Getifaddrs (addrs) = = 0;if (success) {cursor = Addrs;while (cursor! = NULL) {The second test keeps from picking up the loopba
$ String = "13826589549 ";
$ Pattern = "/(\ D {3}) \ D (\ D {2 })/";
$ Replacement = "\ $1 ***** \ $3 ";
Print preg_replace ($ pattern, $ replacement, $ string );
Output result: 138 **** 9549
The matching result is what I want, but the matching mode is incorrect. It can only match 7 digits, and the remaining 4 digits cannot match, and \ $3 does not exist at all.
Which of the following statements is true?
$ String = "13826589549 ";$ Pattern = "/(\ D {3}) \ D {4} (\ D {4 })/";$ Replacemen
PackageCom.jason.demo.androidip;ImportAndroid.content.Context;ImportAndroid.net.DhcpInfo;ImportAndroid.net.wifi.WifiInfo;ImportAndroid.net.wifi.WifiManager;ImportAndroid.text.format.Formatter; Public classIPAddress { PublicString getipaddress (Context ctx) {//Get WiFi serviceWifimanager Wifimanager =(Wifimanager) Getsystemservice (Context.wifi_service); //determine if WiFi is turned on if not turned on this method will turn on WiFi if(!wifimanager.iswifienabled ()) {wifimanager.setwifienab
($ string );$ Tmpstr = ''; www.111cn. NetFor ($ I = 0; $ I {If ($ I >=$ start $ I {If (ord (substr ($ string, $ I, 1)> 129){$ Tmpstr. = substr ($ string, $ I, 2 );}Else{$ Tmpstr. = substr ($ string, $ I, 1 );}}If (ord (substr ($ string, $ I, 1)> 129) $ I ++;}// If (strlen ($ tmpstr) Return $ tmpstr;}}
Example
The Code is as follows:
$ Str = "aliyun.com ";Echo cut_str ($ str, 1, 0). '**'. cut_str ($ str, 1,-1 );// Output: for example, **
The following two
To get the phone's IP address code:
public static String getlocalipaddress () {
try{for
(enumeration
But in 4.0 there will be a similar fe80::b607:f9ff:fee5:487e IP address, this is the address of IPV6, we need to get the add
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.