Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 6728

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Prepares for a connection to a Z39.50 server</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.yaz-close.html">yaz_close</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.yaz-database.html">yaz_database</a></div>
 <div class="up"><a href="ref.yaz.html">YAZ Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.yaz-connect" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">yaz_connect</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.1, PECL yaz &gt;= 0.9.0)</p><p class="refpurpose"><span class="refname">yaz_connect</span> &mdash; <span class="dc-title">
   Prepares for a connection to a Z39.50 server
  </span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.yaz-connect-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <span class="methodname"><strong>yaz_connect</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$zurl</code></span>
   [, <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$options</code></span>
  ] )</div>

  <p class="para rdfs-comment">
   This function returns a connection resource on success, zero on
   failure.
  </p>
  <p class="para">
    <span class="function"><strong>yaz_connect()</strong></span> prepares for a connection to a
   Z39.50 server. 
   This function is non-blocking and does not attempt to establish
   a connection  - it merely prepares a connect to be performed later when
    <span class="function"><a href="function.yaz-wait.html" class="function">yaz_wait()</a></span> is called.
  </p>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <p class="para">
    The <a href="http://www.indexdata.dk/yazproxy/" class="link external">&raquo;&nbsp;YAZ proxy</a> is a
    freely available Z39.50 proxy.
   </p>
  </p></blockquote>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.yaz-connect-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    <dt>

     <span class="term"><em><code class="parameter">zurl</code></em></span>
     <dd>

      <p class="para">
       A string that takes the form <em>host[:port][/database]</em>.
       If port is omitted, port 210 is used. If database is omitted 
       <em>Default</em> is used.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">options</code></em></span>
     <dd>

      <p class="para">
       If given as a string, it is treated as the Z39.50 V2 authentication 
       string (OpenAuth).
      </p>
      <p class="para">
       If given as an array, the contents of the array serves as options.
       <dl>

        <dt>

         <span class="term">user</span>
         <dd>

          <p class="para">
           Username for authentication.
          </p>
         </dd>

        </dt>

        <dt>

         <span class="term">group</span>
         <dd>

          <p class="para">
           Group for authentication.
          </p>
         </dd>

        </dt>

        <dt>

         <span class="term">password</span>
          <dd>

           <p class="para">
            Password for authentication.
           </p>
          </dd>

        </dt>

        <dt>

         <span class="term">cookie</span>
         <dd>

          <p class="para">
           Cookie for session (YAZ proxy).
          </p>
         </dd>

        </dt>

        <dt>

         <span class="term">proxy</span>
         <dd>

          <p class="para">
           Proxy for connection (YAZ proxy).
          </p>
         </dd>

        </dt>

        <dt>

         <span class="term">persistent</span>
         <dd>

          <p class="para">
           A boolean. If <strong><code>TRUE</code></strong> the connection is persistent; If <strong><code>FALSE</code></strong> the
           connection is not persistent. By default connections are persistent.
          </p>
          <blockquote class="note"><p><strong class="note">Note</strong>: 
           <p class="para">
            If you open a persistent connection, you won&#039;t be able to close 
            it later with  <span class="function"><a href="function.yaz-close.html" class="function">yaz_close()</a></span>.
           </p>
          </p></blockquote>
         </dd>

        </dt>

        <dt>

         <span class="term">piggyback</span>
         <dd>

          <p class="para">
           A boolean. If <strong><code>TRUE</code></strong> piggyback is enabled for searches; If <strong><code>FALSE</code></strong>
           piggyback is disabled. By default piggyback is enabled.
          </p>
          <p class="para">
           Enabling piggyback is more efficient and usually saves a 
           network-round-trip for first time fetches of records. However, a 
           few Z39.50 servers do not support piggyback or they ignore element
           set names. For those, piggyback should be disabled.
          </p>
         </dd>

        </dt>

        <dt>

         <span class="term">charset</span>
         <dd>

          <p class="para">
           A string that specifies character set to be used in Z39.50 
           language and character set negotiation. Use strings such as:
           <em>ISO-8859-1</em>, <em>UTF-8</em>, 
           <em>UTF-16</em>.
          </p>
          <p class="para">
           Most Z39.50 servers do not support this feature (and thus, this is
           ignored). Many servers use the ISO-8859-1 encoding for queries and
           messages. MARC21/USMARC records are not affected by this setting.
          </p>
         </dd>

        </dt>


        <dt>

         <span class="term">preferredMessageSize</span>
         <dd>

          <p class="para">
           An integer that specifies the maximum byte size of all records
           to be returned by a target during retrieval. See the
           <a href="http://www.loc.gov/z3950/agency/markup/04.html#3.2.1.1.4" class="link external">&raquo;&nbsp;Z39.50 standard</a> for more
           information.
          </p>
          <blockquote class="note"><p><strong class="note">Note</strong>: 
           <p class="para">
            This option is supported in PECL YAZ 1.0.5 or later.
           </p>
          </p></blockquote>
         </dd>

        </dt>


        <dt>

         <span class="term">maximumRecordSize</span>
         <dd>

          <p class="para">
           An integer that specifies the maximum byte size of a single record
           to be returned by a target during retrieval. This
           entity is referred to as Exceptional-record-size in the
          <a href="http://www.loc.gov/z3950/agency/markup/04.html#3.2.1.1.4" class="link external">&raquo;&nbsp;Z39.50 standard</a>.
          </p>
          <blockquote class="note"><p><strong class="note">Note</strong>: 
           <p class="para">
            This option is supported in PECL YAZ 1.0.5 or later.
           </p>
          </p></blockquote>
         </dd>

        </dt>


       </dl>

      </p>
     </dd>

    </dt>

   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.yaz-connect-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   A connection resource on success, <strong><code>FALSE</code></strong> on error.
  </p>
 </div>

 <div class="refsect1 changelog" id="refsect1-function.yaz-connect-changelog">
  <h3 class="title">Changelog</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Version</th>
       <th>Description</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>4.1.0</td>
       <td>
        The parameter <em><code class="parameter">options</code></em> was added.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>

 <div class="refsect1 seealso" id="refsect1-function.yaz-connect-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"> <span class="function"><a href="function.yaz-close.html" class="function" rel="rdfs-seeAlso">yaz_close()</a> - Close YAZ connection</span></li>
   </ul>
  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.yaz-close.html">yaz_close</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.yaz-database.html">yaz_database</a></div>
 <div class="up"><a href="ref.yaz.html">YAZ Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>