cvs: phpdoc-fr /reference/ldap/functions ldap-search.xml
| From: | Damien Seguy | Date: | Tue, 13 Aug 2002 02:34:06 +0000 |
| Subject: | cvs: phpdoc-fr /reference/ldap/functions ldap-search.xml | ||
| Groups: | php.doc.fr | ||
| Request: | Send a blank email to doc-fr+get-19@lists.php.net to get a copy of this message | ||
dams Mon Aug 12 22:34:06 2002 EDT
Modified files:
/phpdoc-fr/reference/ldap/functions ldap-search.xml
Log:
removed troublesome php script
Index: phpdoc-fr/reference/ldap/functions/ldap-search.xml
diff -u phpdoc-fr/reference/ldap/functions/ldap-search.xml:1.2
phpdoc-fr/reference/ldap/functions/ldap-search.xml:1.3
--- phpdoc-fr/reference/ldap/functions/ldap-search.xml:1.2 Wed Jul 31 15:37:02 2002
+++ phpdoc-fr/reference/ldap/functions/ldap-search.xml Mon Aug 12 22:34:06 2002
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/ldap.xml, last change in rev 1.17 -->
<refentry id="function.ldap-search">
<refnamediv>
@@ -19,127 +19,12 @@
<methodparam
choice="opt"><type>int</type><parameter>timelimit</parameter></methodparam>
<methodparam
choice="opt"><type>int</type><parameter>deref</parameter></methodparam>
</methodsynopsis>
- <para><?php
-* $url_obfuscator = new URL_Obfuscator(
-* 'hash',
-* 'redirect.php',
-* 'url'
-* );
-* ?>
-*
-* <a href="url_obfuscator.php?print=foo">foo</a><br>
-* <a href="url_obfuscator.php?print=bar">bar</a><br>
-* <a href="http://foobar">foobar</a><br><br>
-*
-* <?php
-* echo $_GET['print'] . '<br>';
-* echo 'session_id: ' . session_id();
-* ?>
-*
-* This software and all associated files are released under the
-* GNU Lesser Public License (LGPL), see lgpl.txt for details.
-*
-* @author Sebastian Bergmann <sb@sebastian-bergmann.de>
-* @access public
-*/
-
-class URL_Obfuscator {
- /**
- * @var string
- * @access private
- */
- var $_redirectURL;
-
- /**
- * @var string
- * @access private
- */
- var $_redirectGetParameter;
-
- /**
- * @var string
- * @access private
- */
- var $_getParameter;
-
- /**
- * Constructor
- *
- * @param string Name of GET parameter to transport hash. Default: 'hash'.
- * @param string URL of redirector script. Leave empty (default) to disable.
- * @param string Name of GET parameter to transport target URL to redirector script.
- * @access public
- */
-
- function URL_Obfuscator($getParameter = 'hash', $redirectURL = '',
$redirectGetParameter = '') {
- $this->_getParameter = $getParameter;
- $this->_redirectURL = $redirectURL;
- $this->_redirectGetParameter = $redirectGetParameter;
-
- ini_set('session.use_trans_sid', 0);
- ini_set('session.use_cookies', 0);
-
- if (!isset($_GET[$this->_getParameter])) {
- mt_srand((double) microtime() * 1000000);
- session_id(md5(uniqid(mt_rand())));
- } else {
- $hash = unserialize(base64_decode($_GET[$this->_getParameter]));
- session_id($hash['sid']);
-
- foreach ($hash['get'] as $parameter => $value) {
- $_GET[$parameter] = $value;
- }
- }
-
- ob_start(array($this, '_obfuscate'));
- session_start();
- }
-
- /**
- * @param string
- * @access private
- */
-
- function _obfuscate($buffer) {
- return preg_replace(
- "#href=(\"|')([^\"']+)(\"|')#ime",
-
'"href=\"".$this->_obfuscate_url(\'\\2\')."\""',
- $buffer
- );
- }
-
- /**
- * @param string
- * @access private
- */
- function _obfuscate_url($url) {
- if (strstr($url, 'http://')) {
- if (!empty($this->_redirectURL) && !empty($this->_redirectGetParameter)) {
- $url = $this->_redirectURL . '?' . $this->_redirectGetParameter .
'=' . base64_encode($url);
- }
- } else {
- $url = parse_url($url);
-
- $hash['sid'] = session_id();
-
- foreach (split('&', $url['query']) as $parameter) {
- $tmp = split('=', $parameter);
- $hash['get'][$tmp[0]] = $tmp[1];
- }
-
- $url = $url['host'] . $url['path'] . '?' .
$this->_getParameter . '=' . base64_encode(serialize($hash));
- }
-
- return $url;
- }
-}
-?>
-
+ <para>
<methodname>ldap_search</methodname> retourne un identifiant de
résultat,
ou bien &false; en cas d'erreur.
</para>
<para>
- <function><function>ldap_search</function><\/function> effectue une
recherche avec le
+ <function>ldap_search</function> effectue une recherche avec le
filtre <parameter>filter</parameter> dans le dossier
<parameter>base_dn</parameter> avec le paramétrage
<constant>LDAP_SCOPE_SUBTREE</constant>. C'est l'équivalent