Date: 07/29/00
- Next message: Jani Taskinen: "[PHP-DOC] cvs: phpdoc /en/functions imap.xml"
- Previous message: Jani Taskinen: "[PHP-DOC] cvs: phpdoc /en/functions imap.xml"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
hirokawa Sat Jul 29 15:21:43 2000 EDT
Modified files:
/phpdoc/ja Translators
/phpdoc/ja/functions classobj.xml curl.xml ldap.xml pcre.xml
pspell.xml strings.xml
Log:
translated the curl manual,and some cosmetic changes.
Index: phpdoc/ja/Translators
diff -u phpdoc/ja/Translators:1.4 phpdoc/ja/Translators:1.5
--- phpdoc/ja/Translators:1.4 Sat Jul 15 19:16:17 2000
+++ phpdoc/ja/Translators Sat Jul 29 15:21:43 2000
@@ -34,6 +34,7 @@
functions/calendar.xml Machino Satoshi
functions/classobj.xml Rui Hirokawa
functions/cpdf.xml Rui Hirokawa
+functions/curl.xml Rui Hirokawa
functions/datetime.xml Rui Hirokawa
functions/dba.xml Rui Hirokawa
functions/dbase.xml Rui Hirokawa
Index: phpdoc/ja/functions/classobj.xml
diff -u phpdoc/ja/functions/classobj.xml:1.3 phpdoc/ja/functions/classobj.xml:1.4
--- phpdoc/ja/functions/classobj.xml:1.3 Wed Jul 12 15:13:29 2000
+++ phpdoc/ja/functions/classobj.xml Sat Jul 29 15:21:43 2000
@@ -143,8 +143,8 @@
<para>
注意すべき大事な点ですが、上記の例ではオブジェクト
<varname>$leafy</varname>は
- <varname>Vegetable</varname>のサブクラスであるクラス
- <varname>Spinach</varname>のインスタンスであり、
+ <classname>Vegetable</classname>のサブクラスであるクラス
+ <classname>Spinach</classname>のインスタンスであり、
このスクリプトの最後の部分は以下のような出力となります。
</para>
<para>
Index: phpdoc/ja/functions/curl.xml
diff -u phpdoc/ja/functions/curl.xml:1.1 phpdoc/ja/functions/curl.xml:1.2
--- phpdoc/ja/functions/curl.xml:1.1 Fri Jul 28 02:03:45 2000
+++ phpdoc/ja/functions/curl.xml Sat Jul 29 15:21:43 2000
@@ -1,44 +1,44 @@
<reference id="ref.curl">
- <title>CURL, Client URL Library Functions</title>
+ <title>CURL, Client URL Library 関数</title>
<titleabbrev>CURL</titleabbrev>
<partintro id="curl.partintro">
<para>
- PHP supports libcurl, a library, created by Daniel Stenberg, that
- allows you to connect and communicate to many different types of
- servers with many different types of protocols. libcurl currently
- supports the http, https, ftp, gopher, telnet, dict, file, and
- ldap protocols. libcurl also supports HTTPS certificates, HTTP
- POST, HTTP PUT, FTP uploading (this can also be done with PHP's
- ftp extension), HTTP form based upload, proxies, cookies and
- user+password authentication.
+ PHP は、Daniel Stenbergにより開発されたライブラリlibcurl をサポー
+ トします。このライブラリにより、多くの異なったプロトコルで様々なサー
+ バーと接続し、通信することが可能になります。libcurl は現在
+ http, https, ftp, gopher, telnet, dict, file, ldap プロトコルをサ
+ ポートしてします。libcurl は HTTPS 認証、HTTP POST、HTTP PUT、FTP
+ アップロード(これはPHPのftp拡張機能でも実行可能です)、HTTPフォーム
+ によるアップロード、プロキシ、クッキー、ユーザ名+パスワードによる
+ 認証もサポートします。
</para>
<para>
- In order to use the CURL functions you need to install the <ulink
- url="&url.curl;">CURL</ulink> package. PHP requires that you use
- CURL 7.0.2-beta or higher. PHP will not work with any version of
- CURL below version 7.0.2-beta.
+ CURL関数を使用するためには、<ulink url="&url.curl;">CURL</ulink>パッ
+ ケージをインストールしておく必要があります。PHPは、
+ CURL 7.0.2-beta 以降を必要とします。7.0.2-beta以前のバージョンでは
+ 動作しません。
</para>
<para>
- To use PHP's CURL support you must also compile PHP <option
- role="configure">--with-curl[=DIR]</option> where DIR is the
- location of the directory containing the lib and include
- directories. In the "include" directory there should be a folder
- named "curl" which should contain the easy.h and curl.h files.
- There should be a file named "libcurl.a" located in the "lib"
- directory.
+ PHPのCURLサポート機能を使用するには、<option
+ role="configure">--with-curl[=DIR]</option> を付けてPHPをコンパイ
+ ルしておく必要があります。ただし、DIRは、ディレクトリlibおよび
+ includeを有するディレクトリの場所となります。
+ ディレクトリ"include"には、"curl"という名前のフォルダーがある必要
+ があり、そのフォルダには、ファイルeash.hおよびcurl.hがある必要があ
+ ります。"libcurl.a"という名前のファイルがディレクトリ"lib"にある必
+ 要があります。
</para>
<para>
- Once you've compiled PHP with CURL support, you can begin using
- the curl functions. The basic idea behind the CURL functions is
- that you initialize a CURL session using the
- <function>curl_init</function>, then you can set all your
- options for the transfer via the <function>curl_exec</function>
- and then you finish off your session using the
- <function>curl_close</function>. Here is an example that uses
- the CURL functions to fetch the PHP homepage into a file:
+ PHPをCURLサポート機能付きでコンパイルした場合、curl関数を使用可能
+ となります。CURL関数の基本的な使用法は、
+ <function>curl_init</function>によりCURLセッションを初期化し、
+ 続いて<function>curl_exec</function>により転送を実行し、
+ <function>curl_close</function>によりセッションを終了するというも
+ のになります。CURL関数を使用してPHPホームページをファイルに取得す
+ る例を示します。
<example>
- <title>Using PHP's CURL module to fetch the PHP homepage</title>
+ <title>PHPのCURLモジュールを使用してPHPホームページを取得する</title>
<programlisting role="php">
<?php
@@ -60,10 +60,10 @@
<refentry id="function.curl-init">
<refnamediv>
<refname>curl_init</refname>
- <refpurpose>Initialize a CURL session</refpurpose>
+ <refpurpose>CURLセッションを初期化</refpurpose>
</refnamediv>
<refsect1>
- <title>Description</title>
+ <title>説明</title>
<funcsynopsis>
<funcprototype>
<funcdef>int
@@ -77,17 +77,17 @@
</funcprototype>
</funcsynopsis>
<para>
- The <function>curl_init</function> will initialize a new session
- and return a CURL handle for use with the
+ <function>curl_init</function>は新規セッションを初期化し、CURLハ
+ ンドルを返します。このハンドルは、関数
<function>curl_setopt</function>, <function>curl_exec</function>,
- and <function>curl_close</function> functions. If the optional
- <parameter>url</parameter> parameter is supplied then the
- CURLOPT_URL option will be set to the value of the parameter.
- You can manually set this using the
- <function>curl_setopt</function> function.
+ <function>curl_close</function> で使用します。オプションのパラメー
+ タ <parameter>url</parameter>を指定した場合、オプション
+ CURLOPT_URLがそのパラメータの値に設定されます。関数
+ <function>curl_setopt</function>により、この値をマニュアルで設定
+ することも可能です。
<example>
<title>
- Initializing a new CURL session and fetching a webpage
+ 新規CURLセッションを初期化し、Webページを取得する
</title>
<programlisting role="php">
<?php
@@ -104,8 +104,8 @@
</example>
</para>
<para>
- See also: <function>curl_close</function>,
- <function>curl_setopt</function>
+ <function>curl_close</function>,
+ <function>curl_setopt</function>も参照下さい。
</para>
</refsect1>
</refentry>
@@ -113,10 +113,10 @@
<refentry id="function.curl-setopt">
<refnamediv>
<refname>curl_setopt</refname>
- <refpurpose>Set an option for a CURL transfer</refpurpose>
+ <refpurpose>CURL転送用オプションを設定する</refpurpose>
</refnamediv>
<refsect1>
- <title>Description</title>
+ <title>説明</title>
<funcsynopsis>
<funcprototype>
<funcdef>bool
@@ -134,286 +134,264 @@
</funcprototype>
</funcsynopsis>
<para>
- The <function>curl_setopt</function> function will set options
- for a CURL session identified by the <parameter>ch</parameter>
- parameter. The <parameter>option</parameter> parameter is the
- option you want to set, and the <parameter>value</parameter> is
- the value of the option given by the
- <parameter>option</parameter>.
+ 関数 <function>curl_setopt</function> は、パラメータ
+ <parameter>ch</parameter>で指定したCURLセッションのオプションを設
+ 定します。パラメータ <parameter>option</parameter> には設定するオ
+ プションを指定し、<parameter>value</parameter> には
+ <parameter>option</parameter>で指定したオプションの値を指定します。
</para>
<para>
- The <parameter>value</parameter> should be a long for the
- following options (specified in the <parameter>option</parameter>
- parameter):
+ <parameter>value</parameter> には、(<parameter>option</parameter>で指
+ 定した)以下のオプションをlong値で指定する必要があります。
<itemizedlist>
<listitem>
<simpara>
- <parameter>CURLOPT_INFILESIZE</parameter>: When you are
- uploading a file to a remote site, this option should be used
- to tell PHP what the expected size of the infile will be.
+ <parameter>CURLOPT_INFILESIZE</parameter>: リモートサイトにファ
+ イルをアップロードした際に、このオプションが使用され、infileの
+ サイズの予測値をPHPに教えます。
</simpara>
</listitem>
<listitem>
<simpara>
- <parameter>CURLOPT_VERBOSE</parameter>: Set this option to a
- non-zero value if you want CURL to report everything that is
- happening.
+ <parameter>CURLOPT_VERBOSE</parameter>: CURLで発生事象を全て出
+ 力させたい場合にこのオプションにゼロ以外の値を設定します。
</simpara>
</listitem>
<listitem>
<simpara>
- <parameter>CURLOPT_HEADER</parameter>: Set this option to a
- non-zero value if you want the header to be included in the
- output.
+ <parameter>CURLOPT_HEADER</parameter>: 出力にヘッダを挿入した
+ い場合にこのオプションにゼロ以外の値をlongで設定します。
</simpara>
</listitem>
<listitem>
<para>
- <parameter>CURLOPT_NOPROGRESS</parameter>: Set this option to
- a non-zero value if you don't want PHP to display a progress
- meter for CURL transfers
+ <parameter>CURLOPT_NOPROGRESS</parameter>: CURL転送の進捗状況
+ をPHPに表示させたくない場合にこのオプションにゼロ以外の値を
+ longで設定します。
<note>
<simpara>
- PHP automatically sets this option to a non-zero parameter,
- this should only be changed for debugging purposes.
+ PHP は、自動的にこのオプションにゼロ以外のパラメータをlongで
+ 設定します。このオプションを変更するのはデバッグ時のみとする
+ べきです。
</simpara>
</note>
</para>
</listitem>
<listitem>
<simpara>
- <parameter>CURLOPT_NOBODY</parameter>: Set this option to a
- non-zero value if you don't want the body included with the
- output.
+ <parameter>CURLOPT_NOBODY</parameter>:出力にボディを含ませたく
+ ない場合にこのオプションにゼロ以外のlong値を設定します。
</simpara>
</listitem>
<listitem>
<simpara>
- <parameter>CURLOPT_FAILONERROR</parameter>: Set this option to
- a non-zero value if you want PHP to fail silently if the HTTP
- code returned is greater than 300. The default behaviour is
- to return the page normally, ignoring the code.
+ <parameter>CURLOPT_FAILONERROR</parameter>: 300以上のHTTPコー
+ ドが返された場合に、PHPを失敗させたい場合にゼロ以外のlong値を
+ 設定します。デフォルトの動作は、コードを無視して普通にページを返します。
</simpara>
</listitem>
<listitem>
<simpara>
- <parameter>CURLOPT_UPLOAD</parameter>: Set this option to a
- non-zero value if you want PHP to prepare for an upload.
+ <parameter>CURLOPT_UPLOAD</parameter>: PHPにアップロードを行う
+ 準備をさせたい場合にこのオプションにゼロ以外のlong値を設定します。
</simpara>
</listitem>
<listitem>
<simpara>
- <parameter>CURLOPT_POST</parameter>: Set this option to a
- non-zero value if you want PHP to do a regular HTTP POST.
- This POST is a normal application/x-www-from-urlencoded kind,
- most commonly used by HTML forms.
+ <parameter>CURLOPT_POST</parameter>: PHPに通常のHTTP POSTを行
+ わせたい場合にゼロ以外のlong値を設定します。
+ このPOSTはHTMLフォームで一般に使用される通常の
+ application/x-www-from-urlencoded 型になります。
</simpara>
</listitem>
<listitem>
<simpara>
- <parameter>CURLOPT_FTPLISTONLY</parameter>: Set this option to
- a non-zero value and PHP will just list the names of an FTP
- directory.
+ <parameter>CURLOPT_FTPLISTONLY</parameter>:
+ このオプションにゼロ以外のlong値を設定すると、PHPは、FTPディレクト
+ リの名前のリストを作成します。
</simpara>
</listitem>
<listitem>
<simpara>
- <parameter>CURLOPT_FTPAPPEND</parameter>: Set this option to a
- non-zero value and PHP will append to the remote file instead
- of overwriting it.
+ <parameter>CURLOPT_FTPAPPEND</parameter>: このオプションにゼロ
+ 以外のlong値を設定すると、PHPはリモートファイルを上書きせずに追加
+ します。
</simpara>
</listitem>
<listitem>
<simpara>
- <parameter>CURLOPT_NETRC</parameter>: Set this option to a
- non-zero value and PHP will scan your ~./netrc file to find
- your username and password for the remote site that you're
- establishing a connection with.
+ <parameter>CURLOPT_NETRC</parameter>: このオプションにゼロ以外
+ のlong値を設定すると、PHPは、接続を行うリモートサイトのユーザ名と
+ パスワードを見付けるためにファイル~./netrcをスキャンします。
</simpara>
</listitem>
<listitem>
<simpara>
- <parameter>CURLOPT_FOLLOWLOCATION</parameter>: Set this option
- to a non-zero value to follow any "Location: " header that the
- server sends as a part of the HTTP header (note this is
- recursive, PHP will follow as many "Location: " headers that
- it is sent.)
+ <parameter>CURLOPT_FOLLOWLOCATION</parameter>: このオプション
+ にゼロ以外のlong値を設定すると、サーバーがHTTPヘッダの一部として
+ 送信した"Location: "ヘッダに従います。(注:これは再帰的に行われ、
+ PHPは送信された"Location: "ヘッダに全て従います)
</simpara>
</listitem>
<listitem>
<simpara>
- <parameter>CURLOPT_PUT</parameter>: Set this option a non-zero
- value to HTTP PUT a file. The file to PUT must be set with
- the CURLOPT_INFILE and CURLOPT_INFILESIZE.
+ <parameter>CURLOPT_PUT</parameter>: このオプションはゼロ以外の
+ long値を設定した場合、ファイルのHTTP PUTを行います。PUTを行うファ
+ イルはCURLOPT_INFILEおよびCURLOPT_INFILESIZEで指定する必要があ
+ ります。
</simpara>
</listitem>
<listitem>
<simpara>
- <parameter>CURLOPT_MUTE</parameter>: Set this option to a
- non-zero value and PHP will be completely silent with regards
- to the CURL functions.
+ <parameter>CURLOPT_MUTE</parameter>: このオプションにゼロ以外
+ のlong値を設定した場合、PHPはCURL関数の実行に際して全く出力を行い
+ ません。
</simpara>
</listitem>
<listitem>
<simpara>
- <parameter>CURLOPT_TIMEOUT</parameter>: Pass a long as a
- parameter that contains the maximum time, in seconds, that
- you'll allow the curl functions to take.
+ <parameter>CURLOPT_TIMEOUT</parameter>: curl関数の実行に許可す
+ る最大時間を秒でパラメータでlong値で指定します。
</simpara>
</listitem>
<listitem>
<simpara>
- <parameter>CURLOPT_LOW_SPEED_LIMIT</parameter>: Pass a long as
- a parameter that contains the transfer speed in bytes per
- second that the transfer should be below during
- CURLOPT_LOW_SPEED_TIME seconds for PHP to consider it too slow
- and abort.
+ <parameter>CURLOPT_LOW_SPEED_LIMIT</parameter>: バイト/秒で転
+ 送速度をパラメータでlongで指定します。CURLOPT_LOW_SPEED_TIME 秒以下
+ の場合、転送速度が低いとみなし、処理を中断します。
</simpara>
</listitem>
<listitem>
<simpara>
- <parameter>CURLOPT_LOW_SPEED_TIME</parameter>: Pass a long as
- a parameter that contains the time in seconds that the
- transfer should be below the CURLOPT_LOW_SPEED_LIMIT for PHP
- to consider it too slow and abort.
+ <parameter>CURLOPT_RESUME_FROM</parameter>: 転送を開始したい位
+ 置のオフセットをバイト数でlongで指定します。
</simpara>
</listitem>
<listitem>
<simpara>
- <parameter>CURLOPT_RESUME_FROM</parameter>: Pass a long as a
- parameter that contains the offset, in bytes, that you want
- the transfer to start from.
+ <parameter>CURLOPT_SSLVERSION</parameter>:使用するSSLバージョ
+ ン(2または3)を有するパラメータをlongで指定します。デフォルトで
+ PHPはこれを定義しますが、いくつかのケースでは、マニュアルでこ
+ の値を設定する必要があります。
</simpara>
</listitem>
<listitem>
<simpara>
- <parameter>CURLOPT_SSLVERSION</parameter>: Pass a long as a
- parameter that contains the SSL version (2 or 3) to use. By
- default PHP will try and determine this by itself, although,
- in some cases you must set this manually.
+ <parameter>CURLOPT_TIMECONDITION</parameter>:
+ CURLOPT_TIMEVALUEの処理方法を定義するパラメータをlongで指定し
+ ます。このパラメータでTIMECOND_IFMODSINCEまたは
+ TIMECOND_ISUNMODSINCEを設定することが可能です。この機能はHTTP
+ のみの機能です。
</simpara>
</listitem>
<listitem>
<simpara>
- <parameter>CURLOPT_TIMECONDITION</parameter>: Pass a long as a
- parameter that defines how the CURLOPT_TIMEVALUE is treated.
- You can set this parameter to TIMECOND_IFMODSINCE or
- TIMECOND_ISUNMODSINCE. This is a HTTP-only feature.
+ <parameter>CURLOPT_TIMEVALUE</parameter>: January 1st, 1970か
+ らの時間を秒数でパラメータとしてlongを指定します。
+ オプションCURLOPT_TIMEVALUEで指定した値を時間が使用され、
+ デフォルトでTIMECOND_IFMODSINCEが使用されます。
</simpara>
</listitem>
- <listitem>
- <simpara>
- <parameter>CURLOPT_TIMEVALUE</parameter>: Pass a long as a
- parameter that is the time in seconds since January 1st, 1970.
- The time will be used as specified by the CURLOPT_TIMEVALUE
- option, or by default the TIMECOND_IFMODSINCE will be used.
- </simpara>
- </listitem>
</itemizedlist>
</para>
<para>
- The <parameter>value</parameter> parameter should be a string for
- the following values of the <parameter>option</parameter>
- parameter:
+ パラメータ<parameter>value</parameter>は、パラメータ
+ <parameter>option</parameter>の値により次の値を文字列で指定する必要
+ があります。
<itemizedlist>
<listitem>
<simpara>
- <parameter>CURLOPT_URL</parameter>: This is the URL that you
- want PHP to fetch. You can also set this option when
- initializing a session with the <function>curl_init</function>
- function.
+ <parameter>CURLOPT_URL</parameter>: PHPで取得するURL。
+ <function>curl_init</function>でセッションを初期化する際にこの
+ オプションをしようすることも可能です。
</simpara>
</listitem>
<listitem>
<simpara>
- <parameter>CURLOPT_USERPWD</parameter>: Pass a string
- formatted in the [username]:[password] manner, for PHP to use
- for the connection. connection.
+ <parameter>CURLOPT_USERPWD</parameter>: PHPが接続する際に使用
+ するために[username]:[password]形式のフォーマットの文字列を指
+ 定します。
</simpara>
</listitem>
<listitem>
<simpara>
- <parameter>CURLOPT_PROXYUSERPWD</parameter>: Pass a string
- formatted in the [username]:[password] format for connection
- to the HTTP proxy.
+ <parameter>CURLOPT_PROXYUSERPWD</parameter>: PHPがHTTPプロキシ
+ 接続する際に使用するために[username]:[password]形式のフォーマッ
+ トの文字列を指定します。
</simpara>
</listitem>
<listitem>
<simpara>
- <parameter>CURLOPT_RANGE</parameter>: Pass the specified range
- you want. It should be in the "X-Y" format, where X or Y may
- be left out. The HTTP transfers also support several
- intervals, seperated with commas as in X-Y,N-M.
+ <parameter>CURLOPT_RANGE</parameter>: 範囲を指定します。
+ "X-Y"形式で指定する必要があります。ただし、XまたはYは省略でき
+ ます。HTTP転送はX-Y,N-Mのようにカンマで区切られた複数の間隔も
+ サポートします。
</simpara>
</listitem>
<listitem>
<simpara>
- <parameter>CURLOPT_POSTFIELDS</parameter>: Pass a string
- containing the full data to post in an HTTP "POST" operation.
+ <parameter>CURLOPT_POSTFIELDS</parameter>: HTTP "POST" 命令で
+ ポストするデータ全体を保持する文字列を指定します。
</simpara>
</listitem>
<listitem>
<simpara>
- <parameter>CURLOPT_REFERER</parameter>: Pass a string
- containing the "referer" header to be used in an HTTP request.
+ <parameter>CURLOPT_REFERER</parameter>: HTTPリクエストで使用す
+ る"referer"ヘッダを有する文字列を指定します。
</simpara>
</listitem>
<listitem>
<simpara>
- <parameter>CURLOPT_USERAGENT</parameter>: Pass a string
- containing the "user-agent" header to be used in an HTTP
- request.
+ <parameter>CURLOPT_USERAGENT</parameter>: HTTPリクエストで使用
+ する"user-agent"ヘッダを有する文字列を指定します。
</simpara>
</listitem>
<listitem>
<simpara>
- <parameter>CURLOPT_FTPPORT</parameter>: Pass a string
- containing the which will be used to get the IP address to use
- for the ftp "PORT" instruction. The POST instruction tells
- the remote server to connect to our specified IP address. The
- string may be a plain IP address, a hostname, a network
- interface name (under UNIX), or just a plain '-' to use the
- systems default IP address.
- </simpara>
+ <parameter>CURLOPT_FTPPORT</parameter>:ftp "PORT" コマンドを使
+ 用する際にIPアドレスを取得するために使用される文字列を指定します。
+ PORT命令は指定したIPアドレスに接続するリモートサーバーを教えま
+ す。この文字列には、IPアドレス、ホスト名、(UNIXの)ネットワークイ
+ ンターフェース名、システムのデフォルトIPアドレスを指定する'-'
+ を使用することが可能です。
+ </simpara>
</listitem>
<listitem>
<simpara>
- <parameter>CURLOPT_COOKIE</parameter>: Pass a string
- containing the content of the cookie to be set in the HTTP
- header.
+ <parameter>CURLOPT_COOKIE</parameter>: HTTPヘッダで設定するクッ
+ キーの内容を有する文字列を指定します。
</simpara>
</listitem>
<listitem>
<simpara>
- <parameter>CURLOPT_SSLCERT</parameter>: Pass a string
- containing the filename of PEM formatted certificate.
+ <parameter>CURLOPT_SSLCERT</parameter>: PEM形式の認証のファイ
+ ル名を有する文字列を指定します。
</simpara>
</listitem>
<listitem>
<simpara>
- <parameter>CURLOPT_SSLCERTPASSWD</parameter>: Pass a string
- containing the password required to use the CURLOPT_SSLCERT
- certificate.
+ <parameter>CURLOPT_SSLCERTPASSWD</parameter>:
+ CURLOPT_SSLCERT認証を使用する際に必要なパスワードを有する文字
+ 列を返します。
</simpara>
</listitem>
<listitem>
<simpara>
- <parameter>CURLOPT_COOKIEFILE</parameter>: Pass a string
- containing the name of the file containing the cookiee data.
- The cookie file can be in Netscape format, or just plain
- HTTP-style headers dumped into a file.
+ <parameter>CURLOPT_COOKIEFILE</parameter>: クッキーデータを有
+ するファイルの名前を有する文字列を指定します。
+ クッキーファイルは、Netscape形式または単にHTTP形式のヘッダをファ
+ イルにダンプしたものとなります。
</simpara>
</listitem>
<listitem>
<para>
- <parameter>CURLOPT_CUSTOMREQUEST</parameter>: Pass a string to
- be used instead of GET or HEAD when doing an HTTP request.
- This is useful for doing DELETE or another, more obscure, HTTP
- request.
+ <parameter>CURLOPT_CUSTOMREQUEST</parameter>:HTTPリクエストを
+ 実行する際にGETまたはHEADの代わりに使用される文字列を指定します。
+ DELETEや他のもっと単純なHTTPリクエストを実行する場合に便利です。
<note>
<simpara>
- Don't do this without making sure your server supports the
- command first.
+ まずそのコマンドをサーバーがサポートすることが確認できない場合に
+ はこれを行うべきではありません。
</simpara>
</note>
</para>
@@ -421,31 +399,30 @@
</itemizedlist>
</para>
<para>
- The following options expect a file descriptor that is obtained
- by using the <function>fopen</function> function:
+ 次のオプションには、関数<function>fopen</function>を使用して得ら
+ れたァイル記述子を指定します。
<itemizedlist>
<listitem>
<simpara>
- <parameter>CURLOPT_FILE</parameter>: The file where the output
- of your transfer should be placed, the default is STDOUT.
+ <parameter>CURLOPT_FILE</parameter>: 転送の出力を行うファイル
+ ファイル、デフォルトはSTDOUT。
</simpara>
</listitem>
<listitem>
<simpara>
- <parameter>CURLOPT_INFILE</parameter>: The file where the
- input of your transfer comes from.
+ <parameter>CURLOPT_INFILE</parameter>: 転送の入力元のファイル
</simpara>
</listitem>
<listitem>
<simpara>
- <parameter>CURLOPT_WRITEHEADER</parameter>: The file to write
- the header part of the output into.
+ <parameter>CURLOPT_WRITEHEADER</parameter>: 出力のヘッダ部を書
+ き込むファイル
</simpara>
</listitem>
<listitem>
<simpara>
- <parameter>CURLOPT_STDERR</parameter>: The file to write
- errors to instead of stderr.
+ <parameter>CURLOPT_STDERR</parameter>: stderrの代わりにエラー
+ を書き込むファイル
</simpara>
</listitem>
</itemizedlist>
@@ -456,10 +433,10 @@
<refentry id="function.curl-exec">
<refnamediv>
<refname>curl_exec</refname>
- <refpurpose>Perform a CURL session</refpurpose>
+ <refpurpose>CURLセッションを実行する</refpurpose>
</refnamediv>
<refsect1>
- <title>Description</title>
+ <title>説明</title>
<funcsynopsis>
<funcprototype>
<funcdef>bool
@@ -471,10 +448,10 @@
</funcprototype>
</funcsynopsis>
<para>
- This function is should be called after you initialize a CURL
- session and all the options for the session are set. Its purpose
- is simply to execute the predefined CURL session (given by the
- <parameter>ch</parameter>).
+ この関数は、CURLセッションを初期化し、オプションを全て設定した後
+ にコールする必要があります。この関数は、
+ (<parameter>ch</parameter>で指定した)既存のCURLセッションを実
+ 行する目的で使用されます。
</para>
</refsect1>
</refentry>
@@ -482,10 +459,10 @@
<refentry id="function.curl-close">
<refnamediv>
<refname>curl_close</refname>
- <refpurpose>Close a CURL session</refpurpose>
+ <refpurpose>CURLセッションを閉じる</refpurpose>
</refnamediv>
<refsect1>
- <title>Description</title>
+ <title>説明</title>
<funcsynopsis>
<funcprototype>
<funcdef>void
@@ -497,8 +474,8 @@
</funcprototype>
</funcsynopsis>
<para>
- This functions closes a CURL session and frees all ressources.
- The CURL handle, <parameter>ch</parameter>, is also deleted.
+ この関数は、CURLセッションを閉じ、全てのリソースを開放します。
+ CURLハンドル<parameter>ch</parameter>は削除されます。
</para>
</refsect1>
</refentry>
@@ -506,10 +483,10 @@
<refentry id="function.curl-version">
<refnamediv>
<refname>curl_version</refname>
- <refpurpose>Return the current CURL version</refpurpose>
+ <refpurpose>カレントのCURLのバージョンを返す</refpurpose>
</refnamediv>
<refsect1>
- <title>Description</title>
+ <title>説明</title>
<funcsynopsis>
<funcprototype>
<funcdef>string
@@ -519,8 +496,8 @@
</funcprototype>
</funcsynopsis>
<para>
- The <function>curl_version</function> function returns a string
- containing the current CURL version.
+ 関数<function>curl_version</function>はカレントのCURLのバージョン
+ を有する文字列を返します。
</para>
</refsect1>
</refentry>
Index: phpdoc/ja/functions/ldap.xml
diff -u phpdoc/ja/functions/ldap.xml:1.8 phpdoc/ja/functions/ldap.xml:1.9
--- phpdoc/ja/functions/ldap.xml:1.8 Tue Jul 25 16:03:55 2000
+++ phpdoc/ja/functions/ldap.xml Sat Jul 29 15:21:43 2000
@@ -386,829 +386,199 @@
</refsect1>
</refentry>
-
- <refentry id="function.ldap-connect">
- <refnamediv>
- <refname>ldap_connect</refname>
- <refpurpose>LDAP サーバーへ接続する</refpurpose>
- </refnamediv>
- <refsect1>
- <title>説明</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>int <function>ldap_connect</function></funcdef>
- <paramdef>string <parameter><optional>hostname</optional></parameter></paramdef>
- <paramdef>int <parameter><optional>port</optional></parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <para>
- 成功した場合には、正の LDAP リンクIDを、エラーの場合に FALSE を返します。</para>
- <para>
- <function>ldap_connect</function> は、
- <parameter>hostname</parameter> と <parameter>port</parameter> で
- 指定された LDAP サーバーへの接続を確立します。
- 引数は両方ともオプションです。
- 引数が指定されない場合、既に開かれているリンクのリンク ID が
- 返されます。
- <parameter>hostname</parameter> のみが指定された場合、
- ポートのデフォルト値は、389 となります。</para>
- </refsect1>
- </refentry>
-
-
- <refentry id="function.ldap-count-entries">
- <refnamediv>
- <refname>ldap_count_entries</refname>
- <refpurpose>サーチ時のエントリ数をカウントする</refpurpose>
- </refnamediv>
- <refsect1>
- <title>説明</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>int <function>ldap_count_entries</function></funcdef>
- <paramdef>int <parameter>link_identifier</parameter></paramdef>
- <paramdef>int <parameter>result_identifier</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <para>
- 結果のエントリを数えます。エラーの場合は、FALSE?ߔします。
- </para>
- <para>
- <function>ldap_count_entries</function> は、サーチ実行の結果として
- 保持されたエントリの数を返します。
- <parameter>result_identifier</parameter> は、LDAP 内部の結果を特
- 定します。
- </para>
- </refsect1>
- </refentry>
-
-
- <refentry id="function.ldap-delete">
- <refnamediv>
- <refname>ldap_delete</refname>
- <refpurpose>ディレクトリからエントリを削除する</refpurpose>
- </refnamediv>
- <refsect1>
- <title>説明</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>int <function>ldap_delete</function></funcdef>
- <paramdef>int <parameter>link_identifier</parameter></paramdef>
- <paramdef>string <parameter>dn</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <para>
- 成功の場合にTRUE を、エラーの場合に FALSE を返します。</para>
- <para>
- <function>ldap_delete</function> 関数は、dn より指定された LDAP ディレクトリに
- おける特定のエントリを削除します。</para>
- </refsect1>
- </refentry>
-
-
- <refentry id="function.ldap-dn2ufn">
- <refnamediv>
- <refname>ldap_dn2ufn</refname>
- <refpurpose>DN をユーザに分かりやすい名前のフォーマットに変換する</refpurpose>
- </refnamediv>
- <refsect1>
- <title>説明</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>string <function>ldap_dn2ufn</function></funcdef>
- <paramdef>string <parameter>dn</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <para>
- <function>ldap_dn2ufn</function> 関数は、型名を取り除いて
- DN をよりユーザーに分かりやすい形式に
- 変換するために使用されます。</para>
- </refsect1>
- </refentry>
-
-
- <refentry id="function.ldap-explode-dn">
- <refnamediv>
- <refname>ldap_explode_dn</refname>
- <refpurpose>DN を構成要素毎に分割する</refpurpose>
- </refnamediv>
- <refsect1>
- <title>説明</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>array <function>ldap_explode_dn</function></funcdef>
- <paramdef>string <parameter>dn</parameter></paramdef>
- <paramdef>int <parameter>with_attrib</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <para>
- <function>ldap_explode_dn()</function> 関数は、
- <function>ldap_get_dn</function> により
- 返された DN を分割し複数の要素に分けるために使用されます。
- 各部分は、相対区分名(Relative Distinguished Name または RDN)
- と呼ばれます。
- <function>ldap_explode_dn</function> は、これらの全ての要素を含む
- 配列を返します。
- <parameter>with_attrib</parameter> は、
- RDN が値のみを返すのか、あるいは、属性を同時に返すのかを
- 指定するために使用されます。
- 属性を有する RDN (すなわち、属性=値 フォーマットで) を得るためには
- <parameter>with_attrib</parameter> を 0 とし、
- 値のみを得るためには1 にセットします。</para>
- </refsect1>
- </refentry>
-
-
- <refentry id="function.ldap-first-attribute">
- <refnamediv>
- <refname>ldap_first_attribute</refname>
- <refpurpose>最初の属性を返す</refpurpose>
- </refnamediv>
- <refsect1>
- <title>説明</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>string <function>ldap_first_attribute</function></funcdef>
- <paramdef>int <parameter>link_identifier</parameter></paramdef>
- <paramdef>int <parameter>result_entry_identifier</parameter></paramdef>
- <paramdef>int <parameter>ber_identifier</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <para>
- 成功した場合、エントリの最初の属性を返します。
- エラーの場合に FALSE を返します。</para>
- <para>
- エントリの読み込みと同様に、属性も特定のエントリから一つずつ
- 読み込まれます。
- <function>ldap_first_attribute</function> は、エントリ ID により指された
- エントリにおける最初の属性を返します。
- 残りの属性は、<function>ldap_next_attribute</function> を逐次コールする
- ことにより得ることができます。
- <parameter>ber_identifier</parameter> は、内部メモリにおける位置ポインタ
- の ID です。この ID は、参照渡しされます。
- 同じ <parameter>ber_identifier</parameter> が
- <function>ldap_next_attribute</function> 関数に渡された場合、
- そのポインタは修正されます。
- </para>
- <para>
- <function>ldap_get_attributes</function> も参照下さい。</para>
- </refsect1>
- </refentry>
-
-
- <refentry id="function.ldap-first-entry">
- <refnamediv>
- <refname>ldap_first_entry</refname>
- <refpurpose>初の結果 ID を返す</refpurpose>
- </refnamediv>
- <refsect1>
- <title>説明</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>int <function>ldap_first_entry</function></funcdef>
- <paramdef>int <parameter>link_identifier</parameter></paramdef>
- <paramdef>int <parameter>result_identifier</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <para>
- 成功時に最初のエントリに関する結果エントリ ID を返します。
- エラーの場合に FALSE を返します。</para>
- <para>
- LDAP 結果におけるエントリは、<function>ldap_first_entry</function>
- および <function>ldap_next_entry</function>関数を用いて連続的に読み込まれます。
- <function>ldap_first_entry</function> は、結果における最初のエントリに関する
- エントリ ID を返します。
- このエントリ ID は、結果から連続的にエントリを得るために、
- <function>lap_next_entry</function> ルーチンに渡されます。</para>
- <para>
- <function>ldap_get_entries</function> も参照下さい。</para>
- </refsect1>
- </refentry>
-
-
- <refentry id="function.ldap-free-result">
- <refnamediv>
- <refname>ldap_free_result</refname>
- <refpurpose>結果メモリを開放する</refpurpose>
- </refnamediv>
- <refsect1>
- <title>説明</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>int <function>ldap_free_result</function></funcdef>
- <paramdef>int <parameter>result_identifier</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <para>
- 成功した場合にTRUE を、エラーの場合に FALSE を返します。</para>
- <para>
- <function>ldap_free_result</function> は、結果を保持するために内部的に確保され、
- <parameter>result_identifier</parameter> が指すメモリを開放します。
- 全ての結果メモリは、スクリプト実行終了時に自動的に開放されます。</para>
- <para>
- 通常、LDAP の結果用に確保された全てのメモリはスクリプトの実行終了時
- に開放されます。連続的な検索を行うスクリプトのように大きな
- 結果セットを返す場合、スクリプトにより使用される実行用メモリーを
- 小さく保つために <function>ldap_free_result</function>
- をコールすることが可能です。</para>
- </refsect1>
- </refentry>
-
-
- <refentry id="function.ldap-get-attributes">
- <refnamediv>
- <refname>ldap_get_attributes</refname>
- <refpurpose>サーチ結果エントリから属性を得る</refpurpose>
- </refnamediv>
- <refsect1>
- <title>説明</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>array <function>ldap_get_attributes</function></funcdef>
- <paramdef>int <parameter>link_identifier</parameter></paramdef>
- <paramdef>int
- <parameter>result_entry_identifier</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <para>
- 成功時に完全なエントリ情報を多次元配列で返します。エラーの場合、
- FALSE を返します。</para>
- <para>
- <function>ldap_get_attributes</function> 関数は、探索結果における
- エントリから属性と値を間単に読み込むために使用されます。
- 返り値は、属性と値の多次元配列となります。</para>
- <para>
- ディレクトリに特定のエントリを置いている場合、
- この関数をコールすることにより、そのエントリに関して保持されている情報
- 得ることができます。
- ディレクトリエントリを "ブラウズ" するか、ディレクトリエントリの
- 構造が未知であるアプリケーションにおいてこの関数を使用します。
- 電子メールアドレスや姓のような特定の属性を検索す多くのアプリケーション
- においては、保持されている他のデータにどんなものがあるか
- ということは問題になりません。</para>
- <para>
- <informalexample><literallayout>
- return_value["count"] = そのエントリの属性の数
- return_value[0] = 最初の属性
- return_value[n] = n 番目の属性
-
- return_value["attribute"]["count"] = その属性に関する値の数
- return_value["attribute"][0] = その属性に関する最初の値
- return_value["attribute"][i] = その属性に関する i 番目の値
-</literallayout></informalexample>
-
- <example>
- <title>特定のディレクトリエントリに関して保持されている属性のリストを
-表示</title>
- <programlisting role="php">
- // $ds はディレクトリのリンク ID
-
- // $sr は事前の LDAP のディレクトリ検索コールの有効な結果
-
- $entry = ldap_first_entry($ds, $sr);
-
- $attrs = ldap_get_attributes($ds, $entry);
-
- echo $attrs["count"]." attributes held for this entry:<p>";
-
- for ($i=0; $i<$attrs["count"]; $i++)
- echo $attrs[$i]."<br>";
- </programlisting>
- </example></para>
-
- <para>
- <function>ldap_first_attribute</function> および
- <function>ldap_next_attribute</function> も参照下さい。</para>
-
- </refsect1>
- </refentry>
-
-
- <refentry id="function.ldap-get-dn">
- <refnamediv>
- <refname>ldap_get_dn</refname>
- <refpurpose>結果エントリから DN を得る</refpurpose>
- </refnamediv>
- <refsect1>
- <title>説明</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>string <function>ldap_get_dn</function></funcdef>
- <paramdef>int <parameter>link_identifier</parameter></paramdef>
- <paramdef>int <parameter>result_entry_identifier</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <para>
- 結果エントリの DN を返します。エラーの場合、 FALSE を返します。</para>
- <para>
- <function>ldap_get_dn</function> 関数は、結果におけるあるエントリの DN を見つける
- ために使用されます。</para>
- </refsect1>
- </refentry>
-
-
- <refentry id="function.ldap-get-entries">
- <refnamediv>
- <refname>ldap_get_entries</refname>
- <refpurpose>全ての結果エントリを得る</refpurpose>
- </refnamediv>
- <refsect1>
- <title>説明</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>array <function>ldap_get_entries</function></funcdef>
- <paramdef>int <parameter>link_identifier</parameter></paramdef>
- <paramdef>int <parameter>result_identifier</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <para>
- 成功時に完全な結果情報を多次元配列で返します。
- エラーの場合に FALSE を返します。</para>
- <para>
- <function>ldap_get_entries</function> 関数は、結果から複数のエントリを読み込み、
- 続いて属性と複数の値を読み込むことを簡単に行うために使用されます。
- 全ての情報が一回の関数コールにより多次元配列で返されます。
- 配列の構造は、次のようになります。</para>
- <para>
- 属性インデックスは、小文字に変換されます
- (属性は大文字小文字を区別しますが、配列インデックスとして使用する時は
- 区別されません)
-
- <informalexample>
-<literallayout>
- return_value["count"] = 結果におけるエントリの数
- return_value[0] : 最初のエントリの詳細情報を参照します
-
- return_value[i]["dn"] = 結果における i 番目のエントリ DN
-
- return_value[i]["count"] = i 番目のエントリにおける属性の数
- return_value[i][j] = 結果における i 番目のエントリにおける j 番目の属性
-
- return_value[i]["attribute"]["count"] = i 番目のエントリにおける属性に関する値の数
- return_value[i]["attribute"][j] = i 番目のエントリにおける j 番目の値
-</literallayout>
- </informalexample></para>
-
- <para>
- <function>ldap_first_entry</function> および
- <function>ldap_next_entry</function> も参照下さい。</para>
- </refsect1>
- </refentry>
-
-
- <refentry id="function.ldap-get-values">
- <refnamediv>
- <refname>ldap_get_values</refname>
- <refpurpose>結果エントリから全ての値を得る</refpurpose>
- </refnamediv>
- <refsect1>
- <title>説明</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>array <function>ldap_get_values</function></funcdef>
- <paramdef>int <parameter>link_identifier</parameter></paramdef>
- <paramdef>int <parameter>result_entry_identifier</parameter></paramdef>
- <paramdef>string <parameter>attribute</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <para>
- 成功した場合、指定した属性に関する値を配列を返します。
- エラーの場合には、 FALSE を返します。</para>
- <para>
- <function>ldap_get_values</function> 関数は、結果のエントリにおける属性の全ての値を
- 読み込むために使用されます。
- エントリは、<parameter>result_entry_identifier</parameter>
- により指定されます。
- 値の数は、結果を有する配列において "count" とインデックス指定することに
- より得ることができます。
- 個々の値は、配列において整数インデックスを指定することによりアクセス
- できます。
- 最初のインデックスは、0 です。</para>
- <para>
- この関数のコールは、<parameter>result_entry_identifier</parameter>
- を必要とします。このため、
- 事前に LDAP の検索用関数のコールと個々のエントリ取得用
- 関数のコールを行っておく必要があります。</para>
- <para>
- アプリケーションでは、
- ("surname" または "mail" のような)特定の属性を探すために
- その特性をコードに埋め込んで置くか、さもなくば、
- 指定したエントリに関して存在する属性を調べるために
- <function>ldap_get_attributes</function> をコールする必要があります。</para>
- <para>
- LDAP ではある属性に関して複数のエントリを持つことが可能です。
- このため、例えば、ある人に関する "mail" という属性で呼ばれる全ての
- ディレクトリエントリについて多数の電子メールアドレスを保存することが
- できます。
-
- <informalexample>
-<literallayout>
- return_value["count"] = 属性の値の数
- return_value[0] = 属性の最初の値
- return_value[i] = 属性の i 番目の値
-</literallayout>
- </informalexample>
- <example>
- <title>あるディレクトリエントリの全ての "mail" 属性の一覧を表示します
-</title>
- <programlisting role="php">
- // $ds はディレクトリサーバーの有効なリンク ID
-
- // $sr は事前の LDAP 検索コールのどれかから返された有効な検索結果
-
- // $entry はディレクトリエントリを返すコールのどれかから返された有効な
- // エントリ ID
-
- $values = ldap_get_values($ds, $entry,"mail");
-
- echo $values["count"]." email addresses for this entry.<p>";
-
- for ($i=0; $i < $values["count"]; $i++)
- echo $values[$i]."<br>";
- </programlisting>
- </example></para>
-
- </refsect1>
- </refentry>
-
- <refentry id="function.ldap-get-values-len">
- <refnamediv>
- <refname>ldap_get_values_len</refname>
- <refpurpose>結果エントリから全てのバイナリ値を得る</refpurpose>
- </refnamediv>
- <refsect1>
- <title>説明</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>array <function>ldap_get_values_len</function></funcdef>
- <paramdef>int <parameter>link_identifier</parameter></paramdef>
- <paramdef>int <parameter>result_entry_identifier</parameter></paramdef>
- <paramdef>string <parameter>attribute</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <para>
- 成功時に属性の値を配列で返し、エラー時に false を返します。
- </para>
- <para>
- <function>ldap_get_values_len</function> 関数は、結果のエントリにおける
- 全ての属性の値を読みこむために使用されます。エントリは、
- <parameter>result_entry_identifier</parameter> により指定されます。
- 値の数は、結果の配列の "count" というキーを有する要素から知ること
- ができます。
- 個々の値は、配列インデックスによりアクセスします。最初のインデッ
- クスは、0 です。
- </para>
- <para>
- この関数は、文字列データではなくバイナリデータを処理すること以外は、
- <function>ldap_get_values</function> と全く同じです。
- </para>
- <note>
- <para>
- この関数は4.0で追加されました。
- </para>
- </note>
- </refsect1>
- </refentry>
-
-
-
- <refentry id="function.ldap-list">
- <refnamediv>
- <refname>ldap_list</refname>
- <refpurpose>シングルレベル探索を行う</refpurpose>
- </refnamediv>
- <refsect1>
- <title>説明</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>int <function>ldap_list</function></funcdef>
- <paramdef>int <parameter>link_identifier</parameter></paramdef>
- <paramdef>string <parameter>base_dn</parameter></paramdef>
- <paramdef>string <parameter>filter</parameter></paramdef>
- <paramdef>array
- <parameter><optional>attributes</optional></parameter></paramdef>
- <paramdef>int
- <parameter><optional>attrsonly</optional></parameter>
- </paramdef>
- <paramdef>int
- <parameter><optional>sizelimit</optional></parameter>
- </paramdef>
- <paramdef>int
- <parameter><optional>timelimit</optional></parameter>
- </paramdef>
- <paramdef>int
- <parameter><optional>deref</optional></parameter>
- </paramdef>
- </funcprototype>
- </funcsynopsis>
- <para>
- 検索結果IDを返します。エラーの場合は、falseを返します。
- </para>
- <para>
- <function>ldap_list</function> は、指定されたフィルタを用いて
- LDAP_SCOPE_ONELEVELのスコープを有するディレクトリの検索を行います。
- </para>
- <para>
- LDAP_SCOPE_ONELEVEL は、検索によりコール時に指定した DN の直下の
- レベルにおける情報のみ返されることを意味します。
- ("ls" と入力した際に、現在のワークディレクトリのファイルとフォルダー
- の一覧が得られるのと同じです)
- </para>
- <para>
- この関数のコールは、オプションのパラメータを5つとります。
- <function>ldap_search</function> の記述を参照下さい。
- <note>
- <para>
- 以下のオプションパラメータは4.0.2で追加されました:
- <parameter>attrsonly</parameter>,
- <parameter>sizelimit</parameter>,
- <parameter>timelimit</parameter>,
- <parameter>deref</parameter>
- </para>
- </note>
-
- <example>
- <title>ある組織の全ての組織単位を一覧表示する
- </title>
-<programlisting role="php3">
-// $ds はディレクトリサーバーの有効なリンク ID
-
-$basedn = "o=My Company, c=US";
-$justthese = array("ou");
-
-$sr=ldap_list($ds, $basedn, "ou=*", $justthese);
-
-$info = ldap_get_entries($ds, $sr);
-
-for ($i=0; $i<$info["count"]; $i++)
- echo $info[$i]["ou"][0] ;
- </programlisting>
- </example>
- </para>
- </refsect1>
- </refentry>
-
- <refentry id="function.ldap-modify">
+ <refentry id="function.ldap-compare">
<refnamediv>
- <refname>ldap_modify</refname>
- <refpurpose>LDAP エントリを修正する</refpurpose>
+ <refname>ldap_compare</refname>
+ <refpurpose>
+ DNで指定したエントリで見付かった属性の値を比較する
+ </refpurpose>
</refnamediv>
<refsect1>
<title>説明</title>
<funcsynopsis>
<funcprototype>
- <funcdef>int <function>ldap_modify</function></funcdef>
+ <funcdef>int <function>ldap_compare</function></funcdef>
<paramdef>int <parameter>link_identifier</parameter></paramdef>
<paramdef>string <parameter>dn</parameter></paramdef>
- <paramdef>array <parameter>entry</parameter></paramdef>
+ <paramdef>string <parameter>attribute</parameter></paramdef>
+ <paramdef>string <parameter>value</parameter></paramdef>
</funcprototype>
</funcsynopsis>
- <para>
- 成功時にTRUE 、エラー時に FALSE を返します。</para>
- <para>
- <function>ldap_modify</function> 関数は、LDAP ディレクトリに存在するエントリを
- 修正するために使用されます。
- エントリ(entry)の構造は、<function>ldap_add</function> と同じです。</para>
- </refsect1>
- </refentry>
+ <simpara>
+ <parameter>value</parameter>がマッチする場合にtrue、その他の場合
+ にfalse、エラーの場合に-1を返します。
+ </simpara>
+ <para>
+ <function>ldap_compare</function>は、属性
+ <parameter>attribute</parameter>の値<parameter>value</parameter>
+ を<parameter>dn</parameter>で指定したLDAPディレクトリエントリの同
+ じ属性の値と比較するために使用します。
+ </para>
+ <simpara>
+ 次の例は、指定したパスワードがDNの指定したエントリで定義されたも
+ のと一致するかどうかをチェックする方法を示しています。
+ </simpara>
+ <example>
+ <title>パスワード確認の例</title>
+ <programlisting role="php">
+<?php
+$ds=ldap_connect("localhost"); // LDAPサーバーが同一ホストであると仮定
+
+if ($ds) {
+
+ // バインド
+ if(ldap_bind($ds)) {
+
+ // データを準備
+ $dn = "cn=Matti Meikku, ou=My Unit, o=My Company, c=FI";
+ $value = "secretpassword";
+ $attr = "password";
+
+ // 値を比較
+ $r=ldap_compare($ds, $dn, $attr, $value);
+
+ if ($r === -1) {
+ echo "Error: ".ldap_error($ds);
+ } elseif ($r === TRUE) {
+ echo "Password correct.";
+ } elseif ($r === FALSE) {
+ echo "Wrong guess! Password incorrect.";
+ }
+
+ } else {
+ echo "Unable to bind to LDAP server.";
+ }
- <refentry id="function.ldap-next-attribute">
- <refnamediv>
- <refname>ldap_next_attribute</refname>
- <refpurpose>結果における次の属性を得る</refpurpose>
- </refnamediv>
- <refsect1>
- <title>説明</title>
- <funcsynopsis>
- <funcprototype>
- <funcdef>string <function>ldap_next_attribute</function></funcdef>
- <paramdef>int <parameter>link_identifier</parameter></paramdef>
- <paramdef>int <parameter>result_entry_identifier</parameter></paramdef>
- <paramdef>int <parameter>ber_identifier</parameter></paramdef>
- </funcprototype>
- </funcsynopsis>
- <para>
- 成功した場合、エントリにおける次の属性を返します。
- エラー時に FALSE を返します。</para>
- <para>
- <function>ldap_next_attribute</function> は、あるエントリにおいて
- 属性を得るためにコールされます。ポインタの内部状態は、
- <parameter>ber_identifier</parameter> により保持されます。
- この ID は、参照により関数に渡されます。
- 最初に<function>ldap_next_attribute</function>をコールした際には、
- <function>ldap_first_attribute</function> から返された
- <parameter>result_entry_identifier</parameter> が使用されます。</para>
- <para>
- <function>ldap_get_attributes</function> も参照下さい。</para>
+ ldap_close($ds);
+
+} else {
+ echo "Unable to connect to LDAP server.";
+}
+?>
+
+ </programlisting>
+ </example>
+ <note>
+ <para>
+ <function>ldap_compare</function>はBINARY値を比較することはでき
+ ません!
+ </para>
+ </note>
+ <note>
+ <para>
+ この関数は4.0.2で追加されました。
+ </para>
+ </note>
</refsect1>
</refentry>
-
- <refentry id="function.ldap-next-entry">
+ <refentry id="function.ldap-connect">
<refnamediv>
- <refname>ldap_next_entry</refname>
- <refpurpose>次の結果エントリを得る</refpurpose>
+ <refname>ldap_connect</refname>
+ <refpurpose>LDAP サーバーへ接続する</refpurpose>
</refnamediv>
<refsect1>
<title>説明</title>
<funcsynopsis>
<funcprototype>
- <funcdef>int <function>ldap_next_entry</function></funcdef>
- <paramdef>int <parameter>link_identifier</parameter></paramdef>
- <paramdef>int <parameter>result_entry_identifier</parameter></paramdef>
+ <funcdef>int <function>ldap_connect</function></funcdef>
+ <paramdef>string
+ <parameter><optional>hostname</optional></parameter>
+ </paramdef>
+ <paramdef>int
+ <parameter><optional>port</optional></parameter>
+ </paramdef>
</funcprototype>
</funcsynopsis>
<para>
- <function>ldap_first_entry</function> によりエントリが読み始められた
- 結果において次のエントリに関するエントリID を返します。
- これ以上結果のエントリがない場合は、 FALSE を返します。</para>
+ 成功した場合には、正の LDAP リンクIDを、エラーの場合に FALSE を返
+ します。
+ </para>
<para>
- <function>ldap_next_entry</function> は、結果に保持されたエントリを
- 得るために使用されます。
-
- 連続的に <function>ldap_next_entry</function> をコールした場合、
- エントリがなくなるまでエントリを一つずつ返します。
- <function>ldap_next_entry</function> への最初のコールは、
- <function>ldap_first_entry</function> をresult_entry_identifier
- を指定してコールした後に行われます。
- <function>ldap_get_entries</function> も参照下さい。</para>
+ <function>ldap_connect</function> は、
+ <parameter>hostname</parameter> と <parameter>port</parameter> で
+ 指定された LDAP サーバーへの接続を確立します。
+ 引数は両方ともオプションです。
+ 引数が指定されない場合、既に開かれているリンクのリンク ID が
+ 返されます。
+ <parameter>hostname</parameter> のみが指定された場合、
+ ポートのデフォルト値は、389 となります。
+ </para>
</refsect1>
</refentry>
- <refentry id="function.ldap-read">
+ <refentry id="function.ldap-count-entries">
<refnamediv>
- <refname>ldap_read</refname>
- <refpurpose>エントリを読み込む</refpurpose>
+ <refname>ldap_count_entries</refname>
+ <refpurpose>サーチ時のエントリ数をカウントする</refpurpose>
</refnamediv>
<refsect1>
<title>説明</title>
<funcsynopsis>
<funcprototype>
- <funcdef>int <function>ldap_read</function></funcdef>
+ <funcdef>int <function>ldap_count_entries</function></funcdef>
<paramdef>int <parameter>link_identifier</parameter></paramdef>
- <paramdef>string <parameter>base_dn</parameter></paramdef>
- <paramdef>string <parameter>filter</parameter></paramdef>
- <paramdef>array
- <parameter><optional>attributes</optional></parameter>
- </paramdef>
- <paramdef>int
- <parameter><optional>attrsonly</optional></parameter>
- </paramdef>
- <paramdef>int
- <parameter><optional>sizelimit</optional></parameter>
- </paramdef>
- <paramdef>int
- <parameter><optional>timelimit</optional></parameter>
- </paramdef>
- <paramdef>int
- <parameter><optional>deref</optional></parameter>
- </paramdef>
+ <paramdef>int <parameter>result_identifier</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
- サーチ結果IDを返します。エラーの場合にfalseを返します。
+ 結果のエントリを数えます。エラーの場合は、FALSE?ߔします。
</para>
<para>
- <function>ldap_read</function> は、スコープ LDAP_SCOPE_BASE を有する
- ディレクトリを指定されたフィルタで探索を行います。
- これは、ディレクトリからエントリを読み込むことと等価です。
- </para>
- <para>
- フィルタ(filter)は必ず指定する必要があります。
- このエントリに関する全ての情報を完全に取得したい場合、
- "objectClass=*" というフィルタを使用して下さい。
- ディレクトリサーバーで使用されるエントリの型が分かっている場合、
- "objectClass=inetOrgPerson" のような適当なフィルターを使用すること
- ができます。
- </para>
- <para>
- この関数は、オプションのパラメータを5つとります。
- <function>ldap_search</function> の記述を参照下さい。
+ <function>ldap_count_entries</function> は、サーチ実行の結果として
+ 保持されたエントリの数を返します。
+ <parameter>result_identifier</parameter> は、LDAP 内部の結果を特
+ 定します。
</para>
</refsect1>
</refentry>
+
- <refentry id="function.ldap-search">
+ <refentry id="function.ldap-delete">
<refnamediv>
- <refname>ldap_search</refname>
- <refpurpose>LDAP ツリーを探索する</refpurpose>
+ <refname>ldap_delete</refname>
+ <refpurpose>ディレクトリからエントリを削除する</refpurpose>
</refnamediv>
<refsect1>
<title>説明</title>
<funcsynopsis>
<funcprototype>
- <funcdef>int <function>ldap_search</function></funcdef>
+ <funcdef>int <function>ldap_delete</function></funcdef>
<paramdef>int <parameter>link_identifier</parameter></paramdef>
- <paramdef>string <parameter>base_dn</parameter></paramdef>
- <paramdef>string <parameter>filter</parameter></paramdef>
- <paramdef>array
- <parameter><optional>attributes</optional></parameter>
- </paramdef>
- <paramdef>int
- <parameter><optional>attrsonly</optional></parameter>
- </paramdef>
- <paramdef>int
- <parameter><optional>sizelimit</optional></parameter>
- </paramdef>
- <paramdef>int
- <parameter><optional>timelimit</optional></parameter>
- </paramdef>
- <paramdef>int
- <parameter><optional>deref</optional></parameter>
- </paramdef>
+ <paramdef>string <parameter>dn</parameter></paramdef>
</funcprototype>
</funcsynopsis>
&nbs

