// JAVA
request.getHeader("user-agent")
String ua = ((HttpServletRequest) request).getHeader("user-agent").toLowerCase();
if (ua.indexOf("micromessenger") > 0) {// 是微信浏览器
validation = true;
}
// C#
string ua = HttpContext.Current.Request.UserAgent.ToLower();
return ua.Contains("micromessenger");
// PHP
$user_agent = $_SERVER['HTTP_USER_AGENT'];
return strpos($user_agent, 'MicroMessenger');
// javascript
var ua = window.navigator.userAgent.toLowerCase();
return ua.match(/MicroMessenger/i) == "micromessenger";