<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML ><HEAD ><TITLE >ftp_ssl_connect</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="Manual PHP" HREF="index.html"><LINK REL="UP" TITLE="FTP Functions" HREF="ref.ftp.html"><LINK REL="PREVIOUS" TITLE="ftp_size" HREF="function.ftp-size.html"><LINK REL="NEXT" TITLE="ftp_systype" HREF="function.ftp-systype.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=ISO-8859-2"></HEAD ><BODY CLASS="refentry" 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" >Manual PHP</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.ftp-size.html" ACCESSKEY="P" >Înapoi</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.ftp-systype.html" ACCESSKEY="N" >Înainte</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.ftp-ssl-connect" ></A >ftp_ssl_connect</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN32198" ></A ><P > (PHP 4 >= 4.3.0, PHP 5)</P >ftp_ssl_connect -- Opens an Secure SSL-FTP connection</DIV ><DIV CLASS="refsect1" ><A NAME="AEN32201" ></A ><H2 >Description</H2 >resource <B CLASS="methodname" >ftp_ssl_connect</B > ( string host [, int port [, int timeout]])<BR ></BR ><P > Returns a SSL-FTP stream on success or <TT CLASS="constant" ><B >FALSE</B ></TT > on error. </P ><P > <B CLASS="function" >ftp_ssl_connect()</B > opens a SSL-FTP connection to the specified <VAR CLASS="parameter" >host</VAR >. The <VAR CLASS="parameter" >port</VAR > parameter specifies an alternate port to connect to. If it's omitted or set to zero then the default FTP port 21 will be used. </P ><P > The <VAR CLASS="parameter" >timeout</VAR > parameter specifies the timeout for all subsequent network operations. If omitted, the default value is 90 seconds. The timeout can be changed and queried at any time with <A HREF="function.ftp-set-option.html" ><B CLASS="function" >ftp_set_option()</B ></A > and <A HREF="function.ftp-get-option.html" ><B CLASS="function" >ftp_get_option()</B ></A >. </P ><P > <TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" CLASS="EXAMPLE" ><TR ><TD ><DIV CLASS="example" ><A NAME="AEN32226" ></A ><P ><B >Exemplu 1. <B CLASS="function" >ftp_ssl_connect()</B > example</B ></P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" CELLPADDING="5" ><TR ><TD ><code><font color="#000000"> <font color="#0000BB"><?php<br /><br /></font><font color="#FF8000">// set up basic ssl connection<br /></font><font color="#0000BB">$conn_id </font><font color="#007700">= </font><font color="#0000BB">ftp_ssl_connect</font><font color="#007700">(</font><font color="#0000BB">$ftp_server</font><font color="#007700">);<br /><br /></font><font color="#FF8000">// login with username and password<br /></font><font color="#0000BB">$login_result </font><font color="#007700">= </font><font color="#0000BB">ftp_login</font><font color="#007700">(</font><font color="#0000BB">$conn_id</font><font color="#007700">, </font><font color="#0000BB">$ftp_user_name</font><font color="#007700">, </font><font color="#0000BB">$ftp_user_pass</font><font color="#007700">);<br /><br />echo </font><font color="#0000BB">ftp_pwd</font><font color="#007700">(</font><font color="#0000BB">$conn_id</font><font color="#007700">); </font><font color="#FF8000">// /<br /><br />// close the ssl connection<br /></font><font color="#0000BB">ftp_close</font><font color="#007700">(</font><font color="#0000BB">$conn_id</font><font color="#007700">);<br /></font><font color="#0000BB">?></font> </font> </code></TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE > </P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Why this function may not exist: </B > <B CLASS="function" >ftp_ssl_connect()</B > is only available if <A HREF="ref.openssl.html" >OpenSSL</A > support is enabled into your version of PHP. If it's undefined and you've compiled FTP support then this is why. For Windows you must compile your own PHP binaries to support this function. </P ></BLOCKQUOTE ></DIV ><P > See also <A HREF="function.ftp-connect.html" ><B CLASS="function" >ftp_connect()</B ></A >. </P ></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="function.ftp-size.html" ACCESSKEY="P" >Înapoi</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Acasã</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.ftp-systype.html" ACCESSKEY="N" >Înainte</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >ftp_size</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.ftp.html" ACCESSKEY="U" >Sus</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >ftp_systype</TD ></TR ></TABLE ></DIV ></BODY ></HTML >