mk              Wed May 16 17:50:39 2001 EDT

  Modified files:              
    /phpdoc/de/features remote-files.xml 
  Log:
  remote-files.xml is assigned to Catharina Paulsen in Translators but wasnt in 
phpdoc/de. Started new translation, Catharina forgive me ;)
  
Index: phpdoc/de/features/remote-files.xml
diff -u /dev/null phpdoc/de/features/remote-files.xml:1.4
--- /dev/null   Wed May 16 17:50:39 2001
+++ phpdoc/de/features/remote-files.xml Wed May 16 17:50:39 2001
@@ -0,0 +1,110 @@
+ <chapter id="features.remote-files">
+  <title>Zugriff auf entfernte Dateien</title>
+
+  <para>
+   Wenn die Unterstützung für den &quot;URL fopen wrapper&quot; bei der
+   Konfiguration von PHP vorhanden ist (welche standardmäßig eingestellt ist, es sei 
+denn,
+   die Option <option>--disable-url-fopen-wrapper</option> wurde bei der Installation 
+verwedent (Versionen 
+   bis 4.0.3) oderr der Parameter <parameter>allow_url_fopen</parameter> in der 
+php.ini 
+   ausgestellt wurde (neuere Versionen),
+   können HTTP und FTP URLs bei den meisten Funktionen verwendet werden, die einen
+   Dateinamen als Parameter benötigen, inklusive <function>require</function>
+   und <function>include</function> Anweisungen.
+  </para>
+  <para>
+   <note>
+    <para>
+     remote files funktionieren nicht mit <function>include</function> und
+     <function>require</function> Anweisungen unter Windows.
+    </para>
+   </note>
+  </para>
+  <para>
+   Zum Beispiel kann eine Datei auf einem anderen Webserver geöffnet werden,
+   parse the output for the data you want, and then use that data in a
+   database query, or simply to output it in a style matching the rest
+   of your website.
+  </para>
+  <para>
+   <example>
+    <title>Den Titel einer entfernten Seite auslesen</title>
+    <programlisting role="php">
+<![CDATA[
+<?php
+$file = fopen ("http://www.php.net/";, "r");
+if (!$file) {
+    echo "<p>Datei konnte nicht ge&uuml;ffnet werden.\n";
+    exit;
+}
+while (!feof ($file)) {
+    $line = fgets ($file, 1024);
+    /* Funktioniert nur, wenn Titel und title-Tags in einer Zeile stehen */
+    if (eregi ("<title>(.*)</title>", $line, $out)) {
+        $title = $out[1];
+        break;
+    }
+}
+fclose($file);
+?>
+]]>
+    </programlisting>
+   </example>
+  </para>
+  <para>
+   Auch eine Datei auf einem FTP-Server kann geschrieben werden, solange man sich 
+über 
+   einen Benutzer mit entsprechenden Zugriffsrechten verbindet und die Datei noch 
+nicht existiert.
+   Um sich mit einem anderen Benutzer als 'anonymous' zu verbinden muß ein
+   username (und möglichst ein Passwort) innerhalb der URL angegeben werden, wie z.B.
+   'ftp://user:[EMAIL PROTECTED]/pfad/zur/datei'. (Die selbe Syntax 
+   kann verwendet werden, um auf Daten via HTTP zuzugreifen, wenn diese eine Basic
+   Authentication benötigen.)
+  </para>
+  <para>
+   <example>
+    <title>Daten auf einen entfernten Server speichern</title>
+    <programlisting role="php">
+<![CDATA[
+<?php
+$file = fopen ("ftp://ftp.php.net/incoming/outputfile";, "w");
+if (!$file) {
+    echo "<p>Datei konnte zum schreiben nicht ge&ouml;ffnet werden.\n";
+    exit;
+}
+/* Schreibe die Daten hier hin. */
+fputs ($file, "$HTTP_USER_AGENT\n");
+fclose ($file);
+?>
+]]>  
+    </programlisting>
+   </example>
+  </para>
+  <para>
+   <note>
+    <para>
+     You might get the idea from the example above to use this
+     technique to write to a remote log, but as mentioned above, you
+     can only write to a new file using the URL fopen() wrappers. To
+     do distributed logging like that, you should take a look at
+     <function>syslog</function>.
+    </para> 
+   </note>
+  </para>
+
+ </chapter>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:"../../manual.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->


Reply via email to