PHP ftp_ssl_connect() İşlevi
Örnek
Güvenli bir SSL-FTP bağlantısı açın:
<?php
// set up basic SSL connection
$ftp_server = "123.123.123.123";
$ftp_conn = ftp_ssl_connect($ftp_server) or die("Could not connect to $ftp_server");
// login
$login = ftp_login($ftp_conn, $ftp_username, $ftp_userpass);
// then do something...
// close SSL connection
ftp_close($ftp_conn);
?>
Tanım ve Kullanım
ftp_ssl_connect() işlevi, güvenli bir SSL-FTP bağlantısı açar.
Bağlantı açıkken, sunucuya karşı FTP işlevlerini çalıştırabilirsiniz.
Not: Bu işlev yalnızca hem ftp modülü hem de OpenSSL desteği PHP'de statik olarak oluşturulmuşsa kullanılabilir.
Sözdizimi
ftp_ssl_connect(host, port, timeout);
Parametre Değerleri
Parameter | Description |
---|---|
host | Required. Specifies the FTP server address. Can be a domain address or an IP address. This parameter should not be prefixed with "ftp://" or have any trailing slashes |
port | Optional. Specifies the port to connect to. Default is 21 |
timeout | Optional. Specifies the timeout for network operations. Default is 90 seconds |
Teknik detaylar
Geri dönüş değeri: | Başarı durumunda bir SSL-FTP akışı, başarısızlık durumunda YANLIŞ |
---|---|
PHP Sürümü: | 4.3+ |
PHP Değişiklik Günlüğü: | PHP 5.2.2 - Bu işlev, SSL olmayan bir bağlantıya geri dönmek yerine bir SSL bağlantısı kullanamıyorsa YANLIŞ döndürür |
❮ PHP FTP Referansı