码迷,mamicode.com
首页 >  
搜索关键字:user_agent    ( 1107个结果
user-agent详解
function checkDevice(){ ...
分类:其他好文   时间:2016-12-12 19:33:16    阅读次数:502
修改配置nginx,限制无良爬虫频率
#全局配置 limit_req_zone$anti_spiderzone=anti_spider:10mrate=15r/m; #某个server中 limit_reqzone=anti_spiderburst=30nodelay; if($http_user_agent~*"xxspider|xxbot"){ set$anti_spider$http_user_agent; }超过设置的限定频率,就会给spider一个503。上述配置详细解释..
分类:其他好文   时间:2016-12-06 04:34:05    阅读次数:173
Nginx 使用 sever 段规则屏蔽恶意 User Agent
...
分类:其他好文   时间:2016-12-04 23:30:36    阅读次数:240
一只小爬虫下载jpg图片到桌面 >>>>>python2.7.x
import reimport urllib2headers = {'User-agent' : 'Mozilla/5.0 (Windows NT 6.2; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0'}with open('C:\\Users\\yaxi ...
分类:编程语言   时间:2016-12-03 17:58:02    阅读次数:275
MVC视图展现模式之移动布局
参考:http://www.cnblogs.com/dunitian/p/5218140.html 简单点,直接上用法 新建MVC项目,在golbal.asax中添加如下代码 新建一个view,增加iphone.cshtml为后缀的文件 那么如果user-agent中包含iphone,就会打开该页面 ...
分类:移动开发   时间:2016-12-03 12:40:27    阅读次数:202
Nginx 访问控制&屏蔽指定 user_agent
禁止非法恶意访问的IP[root@LNMP~]#vim/usr/local/nginx/conf/vhosts/linux.conflocation~.*admin\.php${allow127.0.0.1;denyall;#auth_basic"auth";#auth_basic_user_file/usr/local/nginx/conf/.htpasswd;includefastcgi_params;fastcgi_passunix:/tmp/dis.sock;fastcgi_inde..
分类:其他好文   时间:2016-12-03 02:42:31    阅读次数:191
Nginx 指定不产生日志类型(不记录图片日志)
在主配置文件中已经定义了配置文件的格式[root@LNMP~]#vim/usr/local/nginx/conf/nginx.conf#nginx中的配置修改日志命名格式log_formatcombined_realip‘$remote_addr$http_x_forwarded_for[$time_local]‘‘$host"$request_uri"$status‘‘"$http_referer""$http_user_agent"‘;$rem..
分类:其他好文   时间:2016-12-01 22:57:34    阅读次数:2230
php判断手机还是pc
<?php function isMobile(){ $useragent=isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ''; $useragent_commentsblock=preg_match('|.?? ...
分类:移动开发   时间:2016-11-28 08:27:37    阅读次数:204
python爬取手机归属地
用python+bs4爬取了手机归属地数据: import urllib.request from bs4 import BeautifulSoup def spider1(url): headers = {'User-Agent':'Mozilla/5.0 (Windows NT 6.1) App ...
分类:移动开发   时间:2016-11-25 17:28:06    阅读次数:256
浏览器useragent
360的兼容模式用的是IE、极速模式用的是chrom的内核 1. 、User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/53 ...
分类:其他好文   时间:2016-11-19 01:26:53    阅读次数:165
1107条   上一页 1 ... 66 67 68 69 70 ... 111 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!