为什么request.http user agentAgent为空呢,如何解决

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
您的访问请求被拒绝 403 Forbidden - ITeye技术社区
您的访问请求被拒绝
亲爱的会员,您的IP地址所在网段被ITeye拒绝服务,这可能是以下两种情况导致:
一、您所在的网段内有网络爬虫大量抓取ITeye网页,为保证其他人流畅的访问ITeye,该网段被ITeye拒绝
二、您通过某个代理服务器访问ITeye网站,该代理服务器被网络爬虫利用,大量抓取ITeye网页
请您点击按钮解除封锁&HTTP_USER_AGENT为null的原因分析 - 编程知识
欢迎您来访百万站官网主页!&
每一个网站背后都有一个故事!&
您当前位置:
百万站官网资料-HTTP_USER_AGENT为null的原因分析
本类最新播报:〒ⅠⅡⅢⅣ??Tbaiwanzhan
圜医宗HTTP_USER_AGENT为null的原因分析
ASP wap开发Request.ServerVariables("Http_User_Agent")获取为空的原因就是因为手机的上网类型是cmwap而不时cmnet 需要把手机的上网设置为cmnet类型
Question:
when HTTP_USER_AGENT is empty - a robot or spider?& permalink --------------------------------------------------------------------------------
When $_SERVER["HTTP_USER_AGENT"] is empty, does anyone know if this means that the user agent isn't a 'legitimate' browser, i.e. it's robot or spider? Or are their legitimate reasons why this prefefined php variable might be blank?
Which leads me on to my second/related question: does anyone know of any php scripts/classes whose sole purpose in life is to determine whether a user agent visiting a website is a real person using a real browser (any browser, don't care which one or which version) as opposed to a spider or robot?
Thanks!
Answer:
it could be - a security application running on the visitor's PC which is removing the user agent.- a proxy in between which strips personal information.- a perl/asp/php script connecting to your site, just that the programmer forgot to add a useragent- much more. there is no real way to tell.
you COULD try javascript which is certainly the better way to find out what kind of browser is running on the other side nowadays.百万网站 上一站:&&当前推荐网站:&&下一站:&&申明:本资料由百万站会员提供,转载请注明出处,资料来源百万站网站知识库:/site/t122740/. HTTP_USER_AGENT为null的原因分析 感谢您的支持!
(提示:顶到百万站首页,分享给更多网友!)&&
现在有0人对'本文'发表评论
您的姓名:
* 可选项,留空即为匿名发表
评论内容:
剩余字数:& * 按 Ctrl + Enter 发送.
百万站温馨提示:资料由百万站会员自行发布,请大家自辩真伪;评论只需提交一次,请耐心等候审核通过,方可显示.
HTTP_USER_AGENT为null的原因分析贡献者:点击数: 累积有7309人浏览所属类别:主页标签: 无 参考网址:导航目录: >
> 内容简介:HTTP_USER_AGENT为null的原因分析
ASP wap开发Request.ServerVariables(Http_User_Agent)获取为空的原因就是因为手机的上网类型是cmwap而不时cmnet 需要把手机的上网设置为cmnet类型.
编程知识目录影响力知识推荐榜
[2822人关注, , 分享]
[2204人关注, , 分享]
[2512人关注, , 分享]
[2967人关注, , 分享]
[5845人关注, , 分享]
[2775人关注, , 分享]
[2367人关注, , 分享]
[3172人关注, , 分享]
[2673人关注, , 分享]
[3200人关注, , 分享]
您可能感兴趣的一些网站方面的知识
2016,与百万网友携手打造百万站!
百万站-百万优秀网站的大本营!我们深信:每一个优秀网站的背后都有一个值得我们解读的故事。现在位置:&>&
关于HttpWebRequest和HttpWebResponse使用的端口,该如何处理
关于HttpWebRequest和HttpWebResponse使用的端口我用
request & =(HttpWebRequest)HttpWebRequest.Create(strUrl);
request.AllowAutoRedirect & = &
request.UserAgent & = &
&Mozilla/4.0 & ( & MSIE & 6.01; & Windows & NT & 5.0) &;
request.ContentType & = &
&application/x-www-form-urlencoded &;//作为表单请求
request.Method & = &
request.ContentLength & = & B.L
response & = & (HttpWebResponse)request.GetResponse();
System.IO.StreamReader & sr & = & new & System.IO.StreamReader(response.GetResponseStream(), & System.Text.Encoding.GetEncoding( &GB2312 &));
接收数据,现在在电脑上用ie可以访问网页,但是用上面的代码不行。现在网络上有防火墙,请问需要开什么端口?80不行吗?------最佳解决方法--------------------用了代理服务器ISA之类的东东没
------最佳解决方法--------------------需要把Post的数据也传上去的吧,你那个B.Length是什么?可以参考以下代码。
string param =
&text=abc&value=cde &;
byte[] postData = Encoding.ASCII.GetBytes(param);
request.ContentLength = postData.L
Stream requestStream = request.GetRequestStream();
requestStream.Write(postData, 0, postData.Length);
requestStream.Close();
如果没有需要发送的数据,直接用GET方式发送就好了。
相关文章:
&& 最新文章
&& 热门文章
&& 他们在看
/ 【辽】ICP备号-6 /
版权所有 Copyright &如何处理RedirectException的问题_百度知道
如何处理RedirectException的问题
提问者采纳
addHeader(&quot.NET CLR 1:Mozilla/ QQDownload 1;User-Agent&quot.addHeader(&quot, USER_AGENT).0.0 (HttpUriRequest request
= new HttpGet(url).addHeader(& MSIE 6.1;HttpEntity httpEntity =Accept&quot, HOST).7;request.1.setParameter(ClientPNames.NET CLR 2.0;, ACCEPT);其中USER_AGENT的值为, DEFAULT_CHARSET); Windows NT 5;; SV1; ; CIBA.4322, false).ALLOW_CIRCULAR_REDIRECTS;4;Host&;Accept-Charset&quot.addHeader(&.getParams()
来自团队:
其他类似问题
为您推荐:
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁IP:&&&&Time:&
Your User Agent is: Mozilla/4.0 ( MSIE 8.0; Windows NT 6.0; Trident/4.0)
On this page you can find user-agent examples and user agent types. Useragent type is linked with operation system and browser.
Linux have different structure of ua then Windows, see useragent example in user-agent table.
When you visit a Web page, your browser sends the user-agent string to the server hosting the site that you are visiting.
This string indicates which browser you are using, its version number, and details about your system, such as operating system and version.
The Web server can use this information to provide content that is tailored for your specific browser.
When you request a Web page, your browser sends (user agent request) a number of headers to the server hosting the site that you are visiting.
Each header contains details that help the server determine the best way to provide the information that you requested.
The user-agent header identifies the application requesting the information from the server.
Some User Agents for OS - Windows
Internet Explorer 7 (Windows Vista)Mozilla/4.0 ( MSIE 7.0; Windows NT 6.0)
Internet Explorer
6 (Windows XP)Mozilla/4.0 ( MSIE 6.0; Windows NT 5.1)
Internet Explorer
5.5 (Windows 2000)Mozilla/4.0 ( MSIE 5.5; Windows NT 5.0 )
Internet Explorer
5.5 (Windows ME)Mozilla/4.0 ( MSIE 5.5; Windows 98; Win 9x 4.90)
Firefox 3.0 (Windows XP)Mozilla/5.0 (W U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/ Firefox/3.0.1
Firefox 2.0 (Windows XP)Mozilla/5.0 (W U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/ Firefox/2.0.0.14
Google Chrome 0.2.149.29 (Windows XP)Mozilla/5.0 (W U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.29 Safari/525.13
Netscape 4.8 (Windows Vista)Mozilla/4.8 [en] (Windows NT 6.0; U)
Netscape 4.8 (Windows XP)Mozilla/4.8 [en] (Windows NT 5.1; U)
Opera 9.25 (Windows Vista)Opera/9.25 (Windows NT 6.0; U; en)
Opera 8.0 (Windows 2000)Mozilla/4.0 ( MSIE 6.0; Windows NT 5.0; en) Opera 8.0
Opera 7.51 (Windows XP)Opera/7.51 (Windows NT 5.1; U) [en]
Opera 7.5 (Windows XP)Opera/7.50 (Windows XP; U)
Avant BrowserAvant Browser/1.2.789rel1 ()
Netscape 7.1 (Windows 98)Mozilla/5.0 (W U; Win98; en-US; rv:1.4) Gecko Netscape/7.1 (ax)
Multizilla (Windows xp)Mozilla/5.0 (W U; Windows XP) Gecko MultiZilla/1.6.1.0a
Opera 7.5 (Windows ME)Opera/7.50 (Windows ME; U) [en]
Netscape 3.01 gold (Windows 95)Mozilla/3.01Gold (Win95; I)
Netscape 2.02 (Windows 95)Mozilla/2.02E (Win95; U)
Some User Agents for OS -
Safari 125.8 (MacintoshOSX)Mozilla/5.0 (M U; PPC Mac OS X; en) AppleWebKit/125.2 (KHTML, like Gecko) Safari/125.8
Safari 85 (MacintoshOSX)Mozilla/5.0 (M U; PPC Mac OS X; en) AppleWebKit/125.2 (KHTML, like Gecko) Safari/85.8
MSIE 5.15 (MacintoshOS 9)Mozilla/4.0 ( MSIE 5.15; Mac_PowerPC)
Firefox 0.9 (MacintoshOSX )Mozilla/5.0 (M U; PPC Mac OS X Mach-O; en-US; rv:1.7a) Gecko/ Firefox/0.9.0+
Omniweb563 (MacintoshOSX)Mozilla/5.0 (M U; PPC Mac OS X; en-US) AppleWebKit/125.4 (KHTML, like Gecko, Safari) OmniWeb/v563.15
Some User Agents for OS - Linux/Unix/Beos
Mozilla 1.6 (Debian)Mozilla/5.0 (X11; U; L i686; en-US; rv:1.6) Gecko Debian/1.6-7
Epiphany (Linux)Mozilla/5.0 (X11; U; L i686; en-US; rv:1.6) Gecko Epiphany/1.2.5
Epiphany (Ubuntu)Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.3) Gecko/ Epiphany/1.4.4 (Ubuntu)
Konqueror 3.5.10 (Kubuntu)Mozilla/5.0 ( Konqueror/3.5; Linux) KHTML/3.5.10 (like Gecko) (Kubuntu)
FireFox 2.0.0.19 (Ubuntu)Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.19) Gecko/ Ubuntu/8.04 (hardy) Firefox/2.0.0.19
Galeon 1.3.14 (Linux)Mozilla/5.0 (X11; U; L i686; en-US; rv:1.6) Gecko Galeon/1.3.14
Konqueror 3 rc4 (Linux)Konqueror/3.0-rc4; (Konqueror/3.0-rc4; i686 L;datecode)
Konqueror (Gentoo)Mozilla/5.0 ( Konqueror/3.3; Linux 2.6.8-gentoo-r3; X11;
Firefox 0.8 (Linux)Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/ Firefox/0.8
ELinks 0.9.3 (Kanotix)ELinks/0.9.3 ( Linux 2.6.9-kanotix-8 i686; 127x41)
Elinks (Linux)ELinks (0.4pre5; Linux 2.6.10-ac7 i686; 80x33)
Links 2.1 (Linux)Links (2.1pre15; Linux 2.4.26 i686; 158x61)
Links 0.9.1 (Linux)Links/0.9.1 (Linux 2.4.24; i386;)
Opera 7.23 (Linux)MSIE (MSIE 6.0; X11; L i686) Opera 7.23
Opera 9.52Opera/9.52 (X11; Linux i686; U; en)
Lynx 2.8.5rel.1 (Linux)Lynx/2.8.5rel.1 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/0.8.12
w3m 0.5.1 (Linux)w3m/0.5.1
Links 2 (FreeBSD)Links (2.1pre15; FreeBSD 5.3-RELEASE i386; 196x84)
Mozilla 1.7 (FreeBSD)Mozilla/5.0 (X11; U; FreeBSD; i386; en-US; rv:1.7) Gecko
Netscape 4.77 (Irix)Mozilla/4.77 [en] (X11; I; IRIX;64 6.5 IP30)
Netscape 4.8 (SunOS)Mozilla/4.8 [en] (X11; U; SunOS; 5.7 sun4u)
Net Positive (BeOS)Mozilla/3.0 ( NetPositive/2.1.1; BeOS)
Some User-Agents of famous Search Spiders
Googlebot 2.1 (New version)Mozilla/5.0 ( Googlebot/2.1; +/bot.html)
Googlebot 2.1 (Older Version)Googlebot/2.1 (+/bot.html)
Msnbot 1.0 (current version)msnbot/1.0 (+/msnbot.htm)
Msnbot 0.11 (beta version)msnbot/0.11 (+/msnbot.htm)
Yahoo SlurpMozilla/5.0 ( Yahoo! S /help/us/ysearch/slurp)
Ask Jeeves/TeomaMozilla/2.0 ( Ask Jeeves/Teoma)
scoutjetMozilla/5.0 ( ScoutJ +/)
User-Agents of some Spiders
gulperbotGulper Web Bot 0.2.4 (www.ecsl.cs.sunysb.edu/~maxim/cgi-bin/Link/GulperBot)
Email WolfEmailWolf 1.00
grub clientgrub-client-1.5.3; (grub-client-1.5.3; Crawl your own stuff with http://grub.org)
download demonDownload Demon/3.5.0.11
omni webOmniWeb/2.7-beta-3 OWF/1.0
winHTTPSearchExpress
ms url controlMicrosoft URL Control - 6.00.8862

我要回帖

更多关于 c request.useragent 的文章

 

随机推荐