E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
HTTP_USER_AGENT
nginx 记录 post的数据
request_bodylog_formatmain'$remote_addr-$remote_user[$time_local]"$request"''$status$body_bytes_sent"$http_referer"''"$
http_user_agent
小鬼No1
·
2021-05-15 11:22
使用Nginx过滤网络爬虫
其实Nginx可以非常容易地根据User-Agent过滤请求,我们只需要在需要URL入口位置通过一个简单的正则表达式就可以过滤不符合要求的爬虫请求:...location/{if($
http_user_agent
何苦_python_java
·
2021-05-12 23:04
通过用户浏览器信息来判断操作系统。
charset=utf-8;");//测试echoget_user_os();//Windows操作系统functionget_user_os(){//获取用户浏览信息参数$agent=$_SERVER['
HTTP_USER_AGENT
苦咖啡不放糖
·
2021-05-08 13:29
使用Django和Flask获取访问来源referrer
Flaskrequest.referrer#来路request.headers.get('User-Agent')#请求头Djangorequest.META['HTTP_REFERER']#来路request.META.get("
HTTP_USER_AGENT
·
2021-04-23 12:27
Nginx 配置 access log 请求日志详解
log_formatmain'$remote_addr-$remote_user[$time_local]''"$request"$status$bytes_sent''"$http_referer""$
http_user_agent
·
2021-04-07 00:42
linuxnginx
Nginx 配置 access log 请求日志详解
log_formatmain'$remote_addr-$remote_user[$time_local]''"$request"$status$bytes_sent''"$http_referer""$
http_user_agent
·
2021-04-06 23:54
linuxnginx
nginx 多if判断。
set$play0;if($request_uri~"play"){set$play"${flag}1";}if($
http_user_agent
~*Baiduspider){set$play"${flag
有梦想的
·
2021-01-04 04:33
php
Nginx配置反向代理遇到403错误的问题解决
log_formatmain'$remote_addr-$remote_user[$time_local]"$request"''$status$body_bytes_sent"$http_referer"''"$
http_user_agent
叶炎灵
·
2020-12-18 00:41
教程
nginx
centos
运维
linux
服务器
nginx日志的配置及切割
log_formatmain'$remote_addr-$remote_user[$time_local]"$request"''$status$body_bytes_sent"$http_referer"''"$
http_user_agent
G__yuan
·
2020-12-15 19:28
nginx 防盗链,爬虫 配置
新建配置配置文件(例如进入到nginx安装目录下的conf目录,创建:agent_deny.conf)禁止Scrapy等工具的抓取if($
http_user_agent
~*(Scrapy|Curl|HttpClient
大爷来玩呀你懂得
·
2020-11-25 20:04
nginx
前端
referer
nginx 防盗链防爬虫配置详解
新建配置配置文件(例如进入到nginx安装目录下的conf目录,创建:agent_deny.conf)禁止Scrapy等工具的抓取if($
http_user_agent
~*(Scrapy|Curl|HttpClient
·
2020-11-19 18:04
nginx日志分析
remote_addr-$remote_user[$time_local]"$request"''$status[$request_body]$body_bytes_sent"$http_referer"''"$
http_user_agent
自然晟
·
2020-10-11 14:24
nginx多级代理下如何获取客户端真实IP
log_formatmain'$remote_addr-$remote_user[$time_local]"$request"''$status$body_bytes_sent"$http_referer"''"$
http_user_agent
morris131
·
2020-10-10 10:12
nginx
nginx
反向代理
linux
tomcat
java
PHP 文件下载程序 文件打包下载
$name;if(strstr($_SERVER["
HTTP_USER_AGENT
"],"MSIE")){i
小刚刚的小宇宙
·
2020-09-16 19:09
PHP程序分享
php文件下载
php文件打包下载
PHP
Nginx反爬虫策略,防止UA抓取网站
新增反爬虫策略文件:vim/usr/www/server/nginx/conf/anti_spider.conf文件内容#禁止Scrapy等工具的抓取if($
http_user_agent
~*(Scrapy
·
2020-09-16 12:12
Nginx 部署 去掉 # 的Vue 项目(解决刷新后 访问 404)
log_formatmain'$remote_addr-$remote_user[$time_local]"$request"'#'$status$body_bytes_sent"$http_referer"'#'"$
http_user_agent
phubing
·
2020-09-16 03:22
Nginx
Nginx
Vue
nginx中禁止屏蔽网络爬虫
charsetkoi8-r;#access_loglogs/host.access.logmain;#location/{#roothtml;#indexindex.htmlindex.htm;#}if($
http_user_agent
火炬手1128
·
2020-09-16 00:33
nginx
Nginx 常用全局变量
每次都很容易忘记Nginx的变量,下面列出来了一些常用$args$content_length$content_type$document_root$document_uri$host$
http_user_agent
weixin_33816611
·
2020-09-16 00:35
运维
Nginx:日志配置与日志定时分割备份
remote_addr-$remote_user[$time_local]"$request"''$status$upstream_status$body_bytes_sent"$http_referer"''"$
http_user_agent
陌生谁家年少
·
2020-09-15 23:38
Linux
nginx
Nginx日志
nginx 屏蔽采集的 $
http_user_agent
block_cralwer#saveat/etc/nginx/block_cralwer#thenuseit`includeblock_cralwer`at`server`directiveset$fbd0;if($
http_user_agent
用户昵称不能为空
·
2020-09-15 22:23
nginx日志按天保存-原生方法-不用重启
log_formatmain'$remote_addr-$remote_user[$time_local]"$request"''$status$body_bytes_sent"$http_referer"''"$
http_user_agent
muyan9
·
2020-09-14 14:35
原创
系统优化
获取手机型号设备名称
explode("",$ua);echo'';print_r($str[3]);}else{Returnfalse;}publicfunctiongetUA(){if(isset($_SERVER['
HTTP_USER_AGENT
Ethanhuyi
·
2020-09-14 09:37
php随记
php扩展
NGINX 通过 rewrite实现对URL的改写
$
http_user_agent
:客户端agent信息$http_cookie
iteye_3327
·
2020-09-14 06:53
linux
nginx根据设备类型进行url重定向
有两个域名pc.domian.comPC端域名m.domian.com移动端域名1.pc端访问,输入移动端域名重定向到对应的pc版if($
http_user_agent
!~*"^(.
东根
·
2020-09-13 01:13
前端
伪静态 排查某个目录 设置301排查图片的目录
【code】#排查某个目录设置301RewriteCond%{
HTTP_USER_AGENT
}"android|Android|mobile|blackberry|googlebot-mobile|iemobile
权威小土豆
·
2020-09-12 02:28
php
判断网站是手机访问还是pc访问
/**判断手机访问还是pc访问**/functionis_mobile(){$user_agent=$_SERVER['
HTTP_USER_AGENT
'];$mobile_agents=Array("240x320
chezhi6072
·
2020-09-11 12:15
修改Firefox浏览器 user-agent 微信浏览器UA
微信浏览器的
HTTP_USER_AGENT
在iPhone下,返回Mozilla/5.0(iPhone;CPUiPhoneOS5
奕鹰S
·
2020-09-11 05:15
浏览器
nginx日志打印请求响应时间
log_formattimed_combined'$remote_addr-$remote_user[$time_local]"$request"''$status$body_bytes_sent"$http_referer"''"$
http_user_agent
weixin_30847939
·
2020-09-11 04:19
屏蔽几个知名的安全工具对网站进行扫描
RewriteEngineOnRewriteCond%{
HTTP_USER_AGENT
}^w3af.sourceforge.net[NC,OR]RewriteCond%{
HTTP_USER_AGENT
}
god_7z1
·
2020-09-10 13:28
安全防护
NGINX 最基本的防爬虫、防盗链
防爬虫在[server内location外]配置if($
http_user_agent
~*(baiduspider|360spider|haosouspider|googlebot|soso|bing|
懒人笔记—001
·
2020-09-10 12:30
Linux
NGINX
WAF安全应用防火墙(nginx+lua)
应该都不难,只需要在配置文件中的server字段中添加相应的内容即可1、nginx实现rerurn403修改nginx配置文件在server中加入以下内容set$block_user_agent0;if($
http_user_agent
幸福丶如此
·
2020-08-26 13:39
网络路由和route
web服务
nginx: [emerg] unknown directive
服务器遭到一个agent包含java/1.6.0的频繁攻击,本打算按照如下的方式配置nginx来屏蔽请求location/{if($
http_user_agent
~*"java/1.6.0"){rewrite
aigugugu
·
2020-08-24 21:32
服务器随笔
Linux下Nginx日志分析
nginx默认的日志格式为例:$remote_addr-$remote_user[$time_local]"$request"$status$body_bytes_sent"$http_referer""$
http_user_agent
icattlecoder
·
2020-08-24 13:12
access_log
nginx
轻松搞定实时分析及监控大屏
:数据准备数据格式如下:$remote_addr-$remote_user[$time_local]"$request"$status$body_bytes_sent"$http_referer""$
http_user_agent
weixin_34037515
·
2020-08-24 03:46
程序自动判断客户端是手机还是电脑
通过判断用户的
HTTP_USER_AGENT
信息,电脑的
HTTP_USER_AGENT
信息中都会包含...WindowNT...。根据这个发现,我写了一段
Mr.W
·
2020-08-24 02:05
Nginx 日志处理、awstats分析(学习笔记十三)
log_formatwwwlogs'$remote_addr-$remote_usr[$time_local]"$request"''$status$body_bytes_sent"$http_referer"''"$
http_user_agent
SkTj
·
2020-08-24 00:06
ectouch手机版去除微信登录
找到mobile/include/init.phpfunctionis_wechat_browser(){$user_agent=$_SERVER['
HTTP_USER_AGENT
'];if(strpos
这真的是一个帅气的名字
·
2020-08-23 21:27
nginx 配置获取真实的ip
log_formatmain'$remote_addr-$remote_user[$time_local]"$request"''$status$body_bytes_sent"$http_referer"''"$
http_user_agent
scjzhong
·
2020-08-23 19:49
nginx
nginx禁止恶意压力测试
在虚拟主机server里添加if($
http_user_agent
~ApacheBench|WebBench|Wget){return403;}
钱宏健
·
2020-08-23 18:37
nginx
php获取ua的微信版本号
$ua=strtolower($_SERVER['
HTTP_USER_AGENT
']);//查看是不是有微信那个字段在里面preg_match("/MicroMessenger/i",$ua);//转换后
Master_ZO
·
2020-08-23 18:45
php
通过配置实现电脑和手机访问分别显示不同的页面(以thinkphp5为例)
下面加入以下代码即可:functionis_mobile(){//getallheaders();//如果是apache可以直接用这个函数获得请求头$agent=strtolower($_SERVER['
HTTP_USER_AGENT
叛逆的峰峰酱
·
2020-08-23 18:10
php
apache
nginx
同一个网址电脑手机访问显示不同内容思路
例如:tmall.comjs可用device.js;php检测设备类型用到的是:$_SERVER['
HTTP_USER_AGENT
']
idjl
·
2020-08-23 14:50
php学习笔记
设备类型
响应式
微信公众平台-Java-链接只允许在微信内嵌浏览器打开
微信浏览器的
HTTP_USER_AGENT
在iPhone下,返回Mozilla/5.0(iPhone;CPUiPhoneOS5_1likeMacOSX)AppleWebKit/534.46(KHTML,
羽羊
·
2020-08-23 08:23
微信公众平台-Java
2016-12-15 Nginx 之初学者(二)
log_formatmain'$remote_addr-$remote_user[$time_local]"$request"''$status$body_bytes_sent"$http_referer"''"$
http_user_agent
timelikesong
·
2020-08-23 05:14
html5 video全屏播放/自动播放
classHelper{publicstaticfunctionisMobile(){if(preg_match("/(iPhone|iPod|Android|ios|iPad)/i",$_SERVER['
HTTP_USER_AGENT
修炼中的小精灵
·
2020-08-22 20:19
解决在IE下使用PHPExcel导出时的文件名中文乱码问题
$ua=$_SERVER['
HTTP_USER_AGENT
'];$ua=strtolower($ua);if(preg_match('/msie/',$ua)||preg_match('/edge/',
般若Neo
·
2020-08-21 19:09
#
WAMP
PHP解决浏览器 下载文件 中文名称乱码问题--兼容大多浏览器
filename,$charset='UTF-8',$mimeType='application/octet-stream'){//文件名乱码问题if(preg_match("/MSIE/",$_SERVER["
HTTP_USER_AGENT
bj123nimab
·
2020-08-21 18:28
FleaPHP/QEEPHP
资料
vb2005xu自己动手系列
php
解决php 文件下载 IE 文件名中文乱码
谷歌等浏览器没问题方法/步骤1解决方法很简单,判断下载文件所有浏览器是否是IE浏览器,是的话对文件名进行urlencode()转义编码就可以了2如上图所示$userBrowser=$_SERVER['
HTTP_USER_AGENT
J_H_S
·
2020-08-21 18:10
PHP
header(头域)中缓存设置的详解(关于Cache-control和Pragma)
if(strpos($_SERVER['
HTTP_USER_AGENT
'],"MSIE")!==FALSE){header('Content-Type:"'.$mime.'"')
Fanteathy
·
2020-08-21 18:47
PHP
php获取手机设备信息
//版本publicfunctiongetOS(){$ua=$_SERVER['
HTTP_USER_AGENT
'];if(strpos($ua,'Android')!
_zxd
·
2020-08-21 15:39
php
上一页
1
2
3
4
5
6
7
8
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他