I have code like. $accept_charset = $_SERVER["HTTP_ACCEPT_CHARSET"]
Why is this value not as posted on my website in meta?
g1smd
11:58 pm on Jan 24, 2009 (gmt 0)
That variable comes from the user's browser.
It is the character set that their browser accepts.
toplisek
7:26 am on Jan 27, 2009 (gmt 0)
how to read than what is on particular website encoding? Is this possible to be achieved?
coopster
7:02 pm on Jan 27, 2009 (gmt 0)
As mentioned, it is not the website encoding that you will find in that variable. The $_SERVER superglobal name can be a little misleading here. Just because it is named "$_SERVER" does not mean that it holds server configuration information. The http server has read that information from the user agent (browser). The user's browser sends certain information regarding requests made to servers and the server reads that information to determine how to respond to the request.
A bit of background can be gained by reading the Apache content negotiation [httpd.apache.org] manual page and if you really feel up to some hardcore reading, pull RFC2616 and dig in.