Client country PDF Print E-mail
Written by Carl Friis-Hansen   
Friday, 15 February 2008 11:05

On-site there is a class available, which you can use in your Drupal pages or elsewhere to display or react on the user's country. Here is an example:

<?php
require_once "class.getCcode.php";
$country = new getCcode;
?>
You come from <?php print $country->Name(); ?> and<br />
your country code is <?php print $country->Code(); ?>, right?

This example would possibly print something like

You come from Norway and
your country code is NO, right?

Remember, in case of Drupal, to set "Input format" to "PHP code".

Last Updated on Sunday, 02 March 2008 09:45
 

Add comment

To be able to vote and have easier access to write comments, etc., go to Login and register yourself.
Your user name and email will never leave this website.


Security code
Refresh