Xiaomi phone test on Ubuntu notebook PHP page

Source: Internet
Author: User
Tags php cli

Both Ubuntu notebooks and Xiaomi phones are connected to Xiaomi routes.
Ifconfig wlan0 view Ubuntu IP for 192.168.31.156
Php-s 192.168.31.156:8080-t./
If there is no route, you can set up a wireless network with HOSTAPD on your Ubuntu notebook:
http://my.oschina.net/eechen/blog/227230

Development of Port 8080:
sudo ufw allow 8080/tcp && sudo ufw status
Disable port 8080:
sudo ufw delete Allow 8080/tcp

Scan a QR code or enter an address to access a webpage:
Qrencode-o Mi.png http://192.168.31.156:8080

You can see the IP address of your phone from the console of the PHP CLI server.
The AJAX request that the phone polls after the lock screen is paused.
To view the mobile browser user Agent:
<! DOCTYPE html>
<meta charset= "Utf-8" >
<title>user agent</title>
<meta name= "viewport" content= "width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0" >
<body>
<?php
$ua = $_server[' http_user_agent ');
File_put_contents (' Ua.log ', $ua);
Error_log ($ua); Recorded in error_log= "/png/php/php_errors.log"
Echo $ua;
?>
</body>

Report:
Xiaomi 4 comes with a browser:
mozilla/5.0 (Linux; U Android 4.4.4; ZH-CN; MI 4LTE build/ktu84p) applewebkit/537.36 (khtml, like Gecko) version/4.0
chrome/42.0.0.0 Mobile safari/537.36 xiaomi/miuibrowser/2.1.1

The UC Browser on Xiaomi 4:
mozilla/5.0 (Linux; U Android 4.4.4; ZH-CN; MI 4LTE build/ktu84p) applewebkit/534.30 (khtml, like Gecko) version/4.0
ucbrowser/10.8.0.654 u3/0.8.0 Mobile safari/534.30

Samsung S4:
mozilla/5.0 (Linux; Android 4.2.2; gt-i9505 build/jdq39) applewebkit/537.36 (khtml, like Gecko)
chrome/31.0.1650.59 Mobile safari/537.36

iphone 6 && iphone 6 Plus User Agent:
mozilla/5.0 (IPhone; CPU iPhone os 8_0 like Mac os X applewebkit/600.1.3 (khtml, like Gecko) version/8.0
mobile/12a4345d safari/600.1.4

Xiaomi phone test on Ubuntu notebook PHP page

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.