system vs browser
I impemented the script and when I test it, it seems to pull my browser language, not my system language which I thought it was intended for. Any confirmation of this?
Back to top |
|||||
The language script uses the following method to extract language information:
:: Code :: $_SERVER["HTTP_ACCEPT_LANGUAGE"]The following is from php.net: :: Quote :: 'HTTP_ACCEPT_LANGUAGE'
Contents of the Accept-Language: header from the current request, if there is one. Example: 'en'. As php.net notes: :: Quote :: $_SERVER is an array containing information such as headers, paths, and script locations. The entries in this array are created by the webserver. There is no guarantee that every webserver will provide any of these; servers may omit some, or provide others not listed here.In this case, what is being extracted is the header information sent by the requesting user agent. As far as I know, there is no way to detect the system language of a user agent's computer. If there is, I'd like to know it. When a user agent such as a browser visits a site, it sends some headers, one of those headers is the languages it will accept. Your computer, or system, is not visiting the website directly, the web site is being visited by the user agent the visitor is browsing with, or the spider is crawling with, or whatever. If your system was visiting it without this mediating layer, you'd be in very serious trouble from a security standpoint. Well, actually, if you include Active X in MSIE, in a sense MSIE does let the system get accessed by the web, which is why it has so many security issues. So all the web server that is delivering the page has to go on is the header information sent to it by the user agent. Back to top |
|||||
All times are GMT - 8 Hours
|