title: Checking browser's language by PHP?
body: <p>How can I check the language of user's browser by PHP?</p>
  
  <p>I need to show a different page for people in US and in UK.</p>
  
  <p>I tried the following code unsuccessfully</p>
  
  <pre><code>&lt;?php
  if(ereg("us", $_SERVER["HTTP_ACCEPT_LANGUAGE"]))
     include('http://page.com/us.txt');
  else
     include('http://page.com/uk.txt');
  ?&gt;
  </code></pre>
  
  <p>I run a specific code for people in US and for them in UK.</p>