<HTML ><HEAD ><TITLE >FTP and FTPS</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="PHP Manual" HREF="index.html"><LINK REL="UP" TITLE="List of Supported Protocols/Wrappers" HREF="wrappers.html"><LINK REL="PREVIOUS" TITLE="List of Supported Protocols/Wrappers" HREF="wrappers.html"><LINK REL="NEXT" TITLE="PHP input/output streams" HREF="wrappers.php.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=ISO-8859-1"></HEAD ><BODY CLASS="section" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PHP Manual</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="wrappers.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" >Appendix I. List of Supported Protocols/Wrappers</TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="wrappers.php.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="wrappers.ftp" ></A >FTP and FTPS</H1 ><P >PHP 3, PHP 4. <TT CLASS="filename" >ftps://</TT > since PHP 4.3</P ><P ></P ><UL ><LI ><P ><TT CLASS="filename" >ftp://example.com/pub/file.txt</TT ></P ></LI ><LI ><P ><TT CLASS="filename" >ftp://user:password@example.com/pub/file.txt</TT ></P ></LI ><LI ><P ><TT CLASS="filename" >ftps://example.com/pub/file.txt</TT ></P ></LI ><LI ><P ><TT CLASS="filename" >ftps://user:password@example.com/pub/file.txt</TT ></P ></LI ></UL ><P > Allows read access to existing files and creation of new files via FTP. If the server does not support passive mode ftp, the connection will fail. </P ><P > You can open files for either reading or writing, but not both simultaneously. If the remote file already exists on the ftp server and you attempt to open it for writing, the connection will fail. If you need to update existing files over ftp, use <A HREF="function.ftp-connect.html" ><B CLASS="function" >ftp_connect()</B ></A >. </P ><P > <TT CLASS="filename" >ftps://</TT > was introduced in PHP 4.3. It is the same as <TT CLASS="filename" >ftp://</TT >, but attempts to negotiate a secure connection with the ftp server. If the server does not support SSL, then the connection falls back to regular unencrypted ftp. </P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Note: </B >FTPS is supported starting from PHP 4.3, if you have compiled in support for OpenSSL. </P ></BLOCKQUOTE ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="wrappers.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="wrappers.php.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >List of Supported Protocols/Wrappers</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="wrappers.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >PHP input/output streams</TD ></TR ></TABLE ></DIV ></BODY ></HTML >