<?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 => 'uk',
  ),
  'this' => 
  array (
    0 => 'function.geoip-db-avail.php',
    1 => 'geoip_db_avail',
    2 => 'Determine if GeoIP Database is available',
  ),
  'up' => 
  array (
    0 => 'ref.geoip.php',
    1 => 'Функції GeoIP',
  ),
  'prev' => 
  array (
    0 => 'function.geoip-database-info.php',
    1 => 'geoip_database_info',
  ),
  'next' => 
  array (
    0 => 'function.geoip-db-filename.php',
    1 => 'geoip_db_filename',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/geoip/functions/geoip-db-avail.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.geoip-db-avail" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">geoip_db_avail</h1>
  <p class="verinfo">(PECL geoip &gt;= 1.0.1)</p><p class="refpurpose"><span class="refname">geoip_db_avail</span> &mdash; <span class="dc-title">Determine if GeoIP Database is available</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.geoip-db-avail-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>geoip_db_avail</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$database</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>


  <p class="para rdfs-comment">
   The <span class="function"><strong>geoip_db_avail()</strong></span> function returns if the corresponding
   GeoIP Database is available and can be opened on disk.
  </p>

  <p class="para">
   It does not indicate if the file is a proper database, only if it is readable.
  </p>

 </div>

 <div class="refsect1 parameters" id="refsect1-function.geoip-db-avail-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">database</code></dt>
     <dd>
      <p class="para">
       The database type as an integer. You can use the
       <a href="geoip.constants.php" class="link">various constants</a> defined with
       this extension (ie: GEOIP_*_EDITION).
      </p>

     </dd>
    
   </dl>
  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.geoip-db-avail-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   Returns <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> is database exists, <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> if not found, or <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> on error.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.geoip-db-avail-examples">
  <h3 class="title">Приклади</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Приклад #1 A <span class="function"><strong>geoip_db_avail()</strong></span> example</strong></p>
    <div class="example-contents"><p>
     This will output the current database version string.
    </p></div>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #007700">if (</span><span style="color: #0000BB">geoip_db_avail</span><span style="color: #007700">(</span><span style="color: #0000BB">GEOIP_COUNTRY_EDITION</span><span style="color: #007700">))<br />    print </span><span style="color: #0000BB">geoip_database_info</span><span style="color: #007700">(</span><span style="color: #0000BB">GEOIP_COUNTRY_EDITION</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>Поданий вище приклад
виведе:</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">GEO-106FREE 20080801 Build 1 Copyright (c) 2006 MaxMind LLC All Rights Reserved</pre>
</div>
    </div>
   </div>
  </p>
 </div>

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