<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.geoip.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'function.geoip-country-code3-by-name.php',
    1 => 'geoip_country_code3_by_name',
    2 => 'Get the three letter country code',
  ),
  'up' => 
  array (
    0 => 'ref.geoip.php',
    1 => 'GeoIP Functions',
  ),
  'prev' => 
  array (
    0 => 'function.geoip-country-code-by-name.php',
    1 => 'geoip_country_code_by_name',
  ),
  'next' => 
  array (
    0 => 'function.geoip-country-name-by-name.php',
    1 => 'geoip_country_name_by_name',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/geoip/functions/geoip-country-code3-by-name.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.geoip-country-code3-by-name" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">geoip_country_code3_by_name</h1>
  <p class="verinfo">(PECL geoip &gt;= 0.2.0)</p><p class="refpurpose"><span class="refname">geoip_country_code3_by_name</span> &mdash; <span class="dc-title">Get the three letter country code</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.geoip-country-code3-by-name-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>geoip_country_code3_by_name</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$hostname</code></span>): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>


  <p class="simpara">
   The <span class="function"><strong>geoip_country_code3_by_name()</strong></span> function will return the
   three letter country code corresponding to a hostname or an IP address.
  </p>

 </div>

 <div class="refsect1 parameters" id="refsect1-function.geoip-country-code3-by-name-parameters">
  <h3 class="title">Parameters</h3>
  <dl>
   
    <dt><code class="parameter">hostname</code></dt>
    <dd>
     <span class="simpara">
      The hostname or IP address whose location is to be looked-up.
     </span>
    </dd>
   
  </dl>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.geoip-country-code3-by-name-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="simpara">
   Returns the three letter country code on success, or <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>
   if the address cannot be found in the database.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.geoip-country-code3-by-name-examples">
  <h3 class="title">Examples</h3>
  <div class="example" id="example-1">
   <p><strong>Example #1 A <span class="function"><strong>geoip_country_code3_by_name()</strong></span> example</strong></p>
   <div class="example-contents"><p>
    This will print where the host example.com is located.
   </p></div>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$country </span><span style="color: #007700">= </span><span style="color: #0000BB">geoip_country_code3_by_name</span><span style="color: #007700">(</span><span style="color: #DD0000">'www.example.com'</span><span style="color: #007700">);<br />if (</span><span style="color: #0000BB">$country</span><span style="color: #007700">) {<br />    echo </span><span style="color: #DD0000">'This host is located in: ' </span><span style="color: #007700">. </span><span style="color: #0000BB">$country</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

   <div class="example-contents"><p>The above example will output:</p></div>
   <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">This host is located in: USA</pre>
</div>
   </div>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.geoip-country-code3-by-name-seealso">
  <h3 class="title">See Also</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.geoip-country-code-by-name.php" class="function" rel="rdfs-seeAlso">geoip_country_code_by_name()</a> - Get the two letter country code</span></li>
   <li><span class="function"><a href="function.geoip-country-name-by-name.php" class="function" rel="rdfs-seeAlso">geoip_country_name_by_name()</a> - Get the full country name</span></li>
  </ul>
 </div>


</div><?php manual_footer($setup); ?>