简体   繁体   English

是否可以从Web服务器获取服务器和语言信息?

[英]Is possible to get the server and language information from a web server?

I'm connection to web servers using HttpURLConnection . 我正在使用HttpURLConnection连接到Web服务器。

Is there a way to ask to the server to send the language that the page is built (PHP, Java, Python, Ruby, etc) and the web server that is running (Apache, ISS, etc.)? 有没有办法要求服务器发送页面构建语言(PHP,Java,Python,Ruby等)和正在运行的Web服务器(Apache,ISS等)?

As web servers just deliver whatever the end content is (html/javascript/a mp3 -- whatever), they are only obligated to tell you what the content they are giving you is, not how they created it. 由于网络服务器只提供最终内容(html / javascript / a mp3等等),因此它们仅有义务告诉您它们所提供的内容是什么,而不是它们是如何创建的。 Often you will find a Server header that tells you the Apache/PHP version, but most people see that as as security vulnerability and a lot of people will disable it. 通常,您会发现一个服务器标头,告诉您Apache / PHP的版本,但是大多数人将其视为安全漏洞,很多人会禁用它。

The two headers you'll want to look for are Server and X-Powered-By. 您要查找的两个标头是Server和X-Powered-By。

http://en.wikipedia.org/wiki/List_of_HTTP_header_fields http://en.wikipedia.org/wiki/List_of_HTTP_header_fields

As far as I know, no servers have any kind of built in API for asking what the server is. 据我所知,没有服务器具有任何内置的API来询问服务器是什么。 If you own the server you're wondering this about, you could of course make an API with JSP or PHP or whatever. 如果您想知道服务器的所有权,那么您当然可以使用JSP或PHP或其他任何方法创建API。 I'm assuming that's not the case though or you'd already know :). 我假设情况并非如此,否则您已经知道:)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 服务器如何知道来自特定区域的传入请求以区域设置语言提供网页 - How a server get to know the incoming request from a specific region to serve a web page in the locale language 从服务器获取所有信息还是分阶段进行? - Get all the information from the server or do it in stages? Blackberry从Web服务器URL获取JSON - Blackberry get JSON from web server URL 在Apache Web Server中评估表达式语言 - Expression Language evaluated in Apache Web Server 是否可以通过使用 Web 服务器 api 中的 MpAndroid 来显示图表? - Is it possible to show a chart by using MpAndroid from web server api? Java:Web服务服务器获取客户端信息 - Java: Web Service server getting client information 是否可以从远程服务器连续获取文件内容 - Is that possible to get file content continuously from remote server “ setImageDrawable(Drawable.createFromPath)”从Web服务器Android获取图像 - “setImageDrawable(Drawable.createFromPath)” get image from web server Android Android将图像从Web服务器获取到ImageView而不是现金副本 - Android get image to ImageView from web server not cashed copy 如何从Java服务器中仅获取网页的开头部分 - How to get only the head section of a web page from server in java
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM