PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Alexander Skakunov   HTTP Locale   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Usage example
Class: HTTP Locale
Get the idiom and country of the user browser
Author: By
Last change:
Date: 17 years ago
Size: 341 bytes
 

Contents

Class file image Download
<?
include "HTTPLocale.class.php";
$locale = new HTTPLocale();
?>
<html>
  <head>
    <title>HTTPLocale usage example</title>
  </head>
 
  <body>
    Your browser language is <?=$locale->language?><br/>
    Your browser country is <?=( empty($locale->country) ? '[not defined]' : $locale->country );?> <hr/>
  </body>
</html>