Jump to content

variables from $_SERVER array?


Recommended Posts

foreach($_SERVER as $key_name => $key_value) {print $key_name . " = " . $key_value . "<br>";

prints out:

HTTP_USER_AGENT = Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20111108 Iceweasel/3.5.16 (like Firefox/3.5.16)HTTP_ACCEPT = text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8HTTP_ACCEPT_LANGUAGE = en-us,en;q=0.5
etc...how to extract the different parts of HTTP_USER_AGENT and ...LANGUAGE into variables that I can do "if" statements with? thanks.
  • Like 3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...