IIS detection code Access Web site is PC-side or mobile-side users
The code is as follows
Copy Code
ASP check whether the Web site is PC-side or mobile-end user
The code is as follows
Copy Code
Dim u,b,vSet U=request.servervariables ("Http_user_agent")Set B=new REGEXPSet V=new REGEXPB.pattern= "(Android|bbd+|meego). +mobile|avantgo|bada/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile| IP (hone|od) |iris|kindle|lge |ma
in this article, just to download the Nginx configuration on the site can be.Set $mobile _rewrite do_not_perform;if ($http _user_agent ~* "(android|bb\d+|meego). +mobile|avantgo|bada\/|blackberry |blazer|compal|elaine|fennec|hiptop|iemobile|ip (hone|od) |iris|kindle|lge |maemo|midp|mmp|mobile.+firefox| Netfront|opera m (ob|in) i|palm (OS)? | Phone|p (Ixi|re) \/|plucker|pocket|psp|series (4|6) 0|symbian|treo|up\. (browser|link) |vodafone|wap|windows Ce|xda|xiino ") {set $mobile _rewrite perform;
background (save TCPIP application CON TEXT) At+cipmode Select the Tcpip application method (SELECT TCPIP Application Mode) at+cipccfg Configure transparent transfer mode (CONFIGURE TRANSPARENT TRANSFER mode) According to the GSM07.07 at command (at Commands According to GSM07.07) AT+CACM Cumulative Phone meter (ACM) reset or inquire (accumulated call METER (ACM) reset or query) At+camm cumulative phone meter maximum value setting or query ( Accumulated call METER MAXIMUM (Acmmax) SET OR QUERY
Python determines whether a website is from a mobile phone or a PC browser #判断网站来自mobile还是pcdef checkmobile (Request): "" "NBSP;NBSP;NBSP;NBSP;DEMONBSP;: @app. Route ('/m ') defis_from_mobile (): if checkmobile (Request): return ' Mobile ' Else:return ' PC ' :p aramrequest::return: "" "useragent=request.headers[' user-agent ']# Useragent=env.get (' http_user_agent ') _long_matches=r ' Googlebot-mobile|android|avantgo|blackBerry|blazer|elaine|hiptop|ip (Hone|od) |kindle|midp|mmp|mobile|o2|ope
VII. Add service commands
At + ccfc
The call continues.
At + clck
Call prohibited.
At + CPWD
Change the append service password.
At + ccwa
Call wait.
At + clir
Call Line validation restrictions.
At + clip
Call Line confirmation statement.
At + Colp
Contact Line confirmation statement.
At + caoc
Expense report.
At + CACM
Cumulative call measureme
position of a short messageShort Messages overwrite at + wmgo to write a short message and put it in the first blank spaceCall Transfer at + ccfc set call transferInbound carrier at + clck: Lock the inbound carrier and restrict inbound or outbound callsChange the SS password at + CPWD modify the password for providing servicesCall wait at + ccwa control call wait ServiceCall Line Limited at + clir control call line AuthenticationCall line display at
cat is initialized in the initializecallback function.
Static void initializecallback (void * PARAM)
{
Atresponse * p_response = NULL;
Int err;
Setradiostate (radio_state_off );
At_handshake ();
/* Note: We don't check errors here. Everything important will
Be handled in onattimeout and onatreaderclosed */
/* Atchannel is tolerant of ECHO but it must */
/* Have verbose result codes */
At_send_command ("ate0q0v1", null );
/* No auto-answer */
At_send_command ("ats0 = 0", null );
/* Extended erro
Android at command initialization process (For details, refer to the Manual)
1 ate0q0v1 // determines whether to display the echo character
2 ats0 = 0 // automatic response
3 At + cmee = 1 // report mobile device errors. This command determines whether to allow or not to use the result code
"+ CME error:
4 At + CREG = 2 // network registration. Get the Mobile Phone registration status
5at + cgreg = 1 // initialize the GPRS module
6 At + ccwa = 1 // c
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.