curl-library
Connect to a port
Date: Sun, 7 Oct 2007 15:01:58 +0200
Hello,
I'm trying to upload to a site with those parameters
ip: 192.192.192.192
port: 221
user name: user
password: password
directory: in
My code:
FILE *fd = fopen("c:\\AvronTest.txt", "rb"); // the file to upload
CURL *curl = curl_easy_init();
curl_easy_setopt(curl, CURLOPT_URL, "ftp://192.192.192.192/in");
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1);
curl_easy_setopt(curl, CURLOPT_READDATA, fd);
curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, (curl_off_t)file_info.st_size);
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
curl_easy_setopt(curl, CURLOPT_USERPWD, "usere:password");
// without this line it use port 21.
// with this line it use port 22140 ??
curl_easy_setopt(curl, CURLOPT_PORT, "221");
CURLcode res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
The log is:
* About to connect<> to 192.192.192.192 port 22140 <#0>
Why is it going to 22140?
Where did the 40 came from?
How can I connect to port 221?
Avron Tal
----------------------------------------
CONFIDENTIALITY NOTICE:
This email may contain privileged, confidential, copyrighted, or other legally protected information and is for the sole use of the intended recipient(s).The information contained in this message including any attachments is proprietary of Galor System and Software Development LTD.
The information is intended to be conveyed only to the designated recipient(s) of the message. If the reader of this message is not the intended recipient or the responsible party to deliver it to the intended recipient, you are hereby notified that any dissemination, use, distribution or copying of this communication is strictly prohibited and may be unlawful.
If you have received this communication in error, please notify us immediately by replying to the message and immediately delete it and all copies of it from your system and destroy any hard copies.
----------------------------------------
_______________________________________________
cURLpp mailing list
cURLpp_at_rrette.com
http://www.rrette.com/mailman/listinfo/curlpp
Received on 2007-10-07