<doc>
  <legacy_id>2155</legacy_id>
  <name>libURLSetFTPMode</name>
  <type>command</type>
  <syntax>
    <example>libURLSetFTPMode {"active" | "passive"}</example>
  </syntax>
  <library>Internet library</library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Networks &amp; Communication</category>
    <category>Standalone Applications</category>
  </classification>
  <references>
    <command tag="libURLftpUpload">libURLftpUpload Command</command>
    <keyword tag="ftp">ftp Keyword</keyword>
    <command tag="libURLSetFTPStopTime">libURLSetFTPStopTime Command</command>
  </references>
  <history>
    <introduced version="1.1.1">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
  </classes>
  <security>
    <network/>
  </security>
  <summary>Switches between active and passive mode for FTP transfers.</summary>
  <examples>
    <example>libURLSetFTPMode "passive"</example>
    <example>libURLSetFTPMode (the hilitedButtonName of group "Mode")</example>
  </examples>
  <description>
    <p>Use the <b>libURLSetFTPMode</b> <glossary tag="command">command</glossary> to improve performance with FTP <glossary tag="server">servers</glossary> that require active mode.</p><p/><p><b>Comments:</b></p><p>For most FTP servers, passive transfer mode will work without a problem. However, a few servers require transfers to be made in active mode. If you are having trouble with <b>ftp</b> <glossary tag="command">commands</glossary> with a particular <glossary tag="server">server</glossary>, try setting the mode to "active".</p><p/><p>The FTP mode is set to passive when the application starts up. To use active mode exclusively, execute the following statement before making any <b>ftp</b> transfers:</p><p/><p><code>  libURLSetFTPMode "active"</code></p><p/><p><code/><img src="202653"/> <b>Important!</b><code/> The <b>libURLSetFTPMode</b> <glossary tag="command">command</glossary> is part of the <glossary tag="Internet library">Internet library</glossary>. To ensure that the <glossary tag="command">command</glossary> works in a <glossary tag="standalone application">standalone application</glossary>, you must include this <glossary tag="LiveCode custom library">custom library</glossary> when you create your <glossary tag="standalone application">standalone</glossary>. In the Inclusions section of the <glossary tag="Standalone Application Settings">Standalone Application Settings</glossary> window, make sure "Internet Library" is selected in the list of script libraries.</p><p/><p><code/><b>Note:</b><code/> When included in a <glossary tag="standalone application">standalone application</glossary>, the <glossary tag="Internet library">Internet library</glossary> is implemented as a hidden <command tag="group">group</command> and made available when the <command tag="group">group</command> receives its first <message tag="openBackground">openBackground</message> message. During the first part of the <glossary tag="application">application's</glossary> startup process, before this <keyword tag="message box">message</keyword> is sent, the <b>libURLSetFTPMode</b> <glossary tag="command">command</glossary> is not yet available. This may affect attempts to use this <glossary tag="command">command</glossary> in <message tag="startup">startup</message>, <message tag="preOpenStack">preOpenStack</message>, <message tag="openStack">openStack</message>, or <message tag="preOpenCard">preOpenCard</message> <glossary tag="handler">handlers</glossary> in the <glossary tag="main stack">main stack</glossary>. Once the <glossary tag="application">application</glossary> has finished starting up, the <command tag="start using">library</command> is available and the <b>libURLSetFTPMode</b> <glossary tag="command">command</glossary> can be used in any <glossary tag="handler">handler</glossary>.</p>
  </description>
</doc>