Ik gebruik dit script om verbinding te maken met een server met poort 22, FTP via SSL dus.
<?php
$rCurl = curl_init();

curl_setopt_array(
$rCurl,
array(
CURLOPT_URL => "s05.XXX.eu",
CURLOPT_PORT => 22
)
);

$bCurl = curl_exec($rCurl);
?>
Het probleem is alleen dat $bCurl false is, ik met curl_errnr() 56 terug krijg, en met curl_error() "Failure when receiving data from the peer". De cURL-site geeft 'Failure with receiving network data.' als description voor errnr 56. Heeft iemand enig idee hoe ik dit kan oplossen?

Alvast bedankt voor de moeite!

PHP supports libcurl, a library created by Daniel Stenberg, that allows you to connect and communicate to many different types of servers with many different types of protocols. libcurl currently supports the http, https, ftp, gopher, telnet, dict, file, and ldap protocols.. libcurl also supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading (this can also be done with PHP's ftp extension), HTTP form based upload, proxies, cookies, and user+password authentication.

FTP wel dus. Maar ik zie nu ook de SFTP daar niet tussen staat... That's a pity...
Volgens mij haal ik hier SFTP: FTP via SSH, die poort 22 gebruikt en FTPS: FTP over SSL, die gewoon poort 21 gebruikt door elkaar... Het komt er in ieder geval op neer dat ik via cURL met een server met poort 22 wil verbinden, wat dus niet lukt, en niet lijkt te kunnen. Jammer maar helaas.

Reageren