码迷,mamicode.com
首页 >  
搜索关键字:http_user_agent    ( 158个结果
PHP获取访客ip、系统、浏览器等信息[转]
1.获取访客操作系统信息 <?php <?php function GetOs() { function GetOs() { if (!empty($_SERVER['HTTP_USER_AGENT'])) { if (!empty($_SERVER['HTTP_USER_AGENT'])) { $ ...
分类:Web程序   时间:2018-09-18 11:07:54    阅读次数:208
RewriteCond/RewriteRule解释
在编写Apache重写或者看别人的重写时,经常会看到以下段落 RewriteEngine onRewriteCond %{HTTP_USER_AGENT} ^Mozilla/5.0.*RewriteRule index.php index.m.php RewriteCond 就像程序中的if语句一样 ...
分类:其他好文   时间:2018-09-12 19:58:15    阅读次数:171
php获取设备型号
/*获取设备型号*/functionget_device_type(){$agent=strtolower($_SERVER[‘HTTP_USER_AGENT‘]);$type=‘other‘;if(strpos($agent,‘iphone‘)||strpos($agent,‘ipad‘)){$type=‘ios‘;}if(strpos($agent,‘android‘)){$type=‘and
分类:Web程序   时间:2018-09-10 13:30:25    阅读次数:556
nginx反向代理负载均衡简述
基于浏览器实现分离案例if($http_user_agent~Firefox){rewrite^(.)$/firefox/$1break;}if($http_user_agent~MSIE){rewrite^(.)$/msie/$1break;}if($http_user_agent~Chrome){rewrite^(.*)$/chrome/$1break;}防盗链案例:location~*.(j
分类:其他好文   时间:2018-09-03 21:33:51    阅读次数:167
需要当手机访问PC站页面时自动跳转到对应的手机站页面
if($http_user_agent~"((MIDP)|(WAP)|(UP.Browser)|(Smartphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(UP.Link)|(KM.Browser)|(UCWEB)|(SEMC-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)
分类:移动开发   时间:2018-06-22 17:38:09    阅读次数:210
nginx访问日志,日志切割,静态文件不记录日志
nginx访问日志日志格式[root@aminglinux-02nginx]#vimconf/nginx.conflog_formatcombined_realip‘$remote_addr$http_x_forwarded_for[$time_local]‘‘$host"$request_uri"$status‘‘"$http_referer""$http_user_agent"‘;combin
分类:其他好文   时间:2018-06-19 10:32:53    阅读次数:237
第八章(3)
1.views-请求的其他信息 1 from django.core.handlers.wsgi import WSGIRequest 2 3 request.environ 4 request.environ['HTTP_USER_AGENT'] 2.模板继承和引用 1 urlpatterns = ...
分类:其他好文   时间:2018-05-26 17:09:23    阅读次数:204
PHP 判断是否在微信内部浏览器访问
<?php if(is_weixin()){ echo "这是微信内部浏览器"; }else{ echo "这是微信外部浏览器"; } function is_weixin(){ if ( strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') ! ...
分类:微信   时间:2018-05-23 10:58:43    阅读次数:248
PHP和JS判断浏览器是微信还是支付宝
PHP代码if(strpos($_SERVER[‘HTTP_USER_AGENT‘],‘MicroMessenger‘)!==false){return‘WeiXin’;}//判断是不是支付宝if(strpos($_SERVER[‘HTTP_USER_AGENT‘],‘AlipayClient‘)!==false){return"AliPay";}JS判断functionWxOrAli(){var
分类:微信   时间:2018-05-02 16:08:07    阅读次数:1616
nginx_tomcat
log_format weparts '$remote_addr [$time_iso8601] $request - $status "$http_user_agent" $body_bytes_sent $request_time';server { listen 80; server_name ...
分类:其他好文   时间:2018-04-24 13:56:54    阅读次数:121
158条   上一页 1 2 3 4 5 ... 16 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!