![]() |
/Error Detail/
Code:
Here's the Login Details: |
1. please use [code][/code] to keep formatting
2. do not nest if statements, use: if <something> { handle error and exit } if <something else> { handle error and exit } 3. try to explain what's happened: Did FtpGet create a file, what was the content. 4. call FtpClose at the end. 5. Probably you need to start with FtpInit. 6. try FtpLastResponse to read message and print it, maybe you can find something useful in it |
Moved: This thread is more suitable in Programming and has been moved accordingly to help your thread/question get the exposure it deserves.
|
Dear pan64:
on the basis of CURL library implementation in program http://curl.haxx.se/libcurl/c/ftpget.html & in http://curl.haxx.se/libcurl/c/ftpupload.html can u please assist using these functions of library in this url http://nbpfaus.net/~pfau/ftplib/ftplib.html means which functions will be called after which function(just for GET & PUT operations). i gave the whole half day on learning CURL-library but i didn't find equivalent functions in both of them. please assist me. |
actually they are really hard to compare, but:
you can use the main function of ftpget.html to implement your ftpget, you need to modify it to pass user/password/url. Also the second link can be used as a base for your ftpput. |
i went through long way in this project and finally using CURL itself..
all the work i have joined intact.but a little doubt as i am doing all the stuffs as being anonymous user i.e i need not to put "user" & "pass" thats why unable to go to root directory..can u plz help me out on the case where to pass USER & PASS for being able to access root directory.. -- |
I do not really understand it, but here is the way to set user and/or pw: use curl_easy_setopt. See http://curl.haxx.se/libcurl/c/curl_e...URLOPTUSERNAME and http://curl.haxx.se/libcurl/c/curl_e...URLOPTPASSWORD
I hope this helps |
i tried hard to learn from there...
i got to know while googling that there is a "ftplib-3.1-1 project" which used CURL library but its using EditLine. so can you go through netkit-ftp_0.17.orig.tar.gz just only login part,that how it enables login through CURL library. -- meet you tomorrow |
I'm not really sure what ftplib is that, next time please give some links also. I found this, there is an example at the end, probably helps:
http://cboard.cprogramming.com/c-pro...-possible.html |
Dear pan64:
i did it sir!! from the first hour onwards i continuously read CURL Tutorial.. in password section it was give.. i had to just add one more curl_easy_setopt before giving url of the file to GET i.e. Code:
curl_easy_setopt(curl, CURLOPT_USERPWD, "root:rootroot"); -- thnx for ur long support |
great! good job.
|
dear pan64:
Actually i got stuck in one thing..Actually i need advice on that.. In the program http://curl.haxx.se/libcurl/c/ftpupload.html i am using this program to transfer multiple files.. and passing all the required variables LOCAL_FILE,UPLOAD_FILE_AS,RENAME_FILE_TO,REMOTE_URL..through linked list so finally its all working in while loop..but there's a function "curl_slist_append()" which isn't working.. please have a look on that.. |
what do you mean by "not working"? What is the real code and what happened?
|
Actually my sir told me...what in the case if someone(user) try to send multiple files.
for that i made a while loop which feeds these variables "LOCAL_FILE,UPLOAD_FILE_AS,RENAME_FILE_TO,REMOTE_URL".. but for each file transfer Curl Authenticates in function: Code:
curl_easy_setopt(curl, CURLOPT_USERPWD, authentication); sir told me in Real Time it is not acceptable.. so i need to ask what modification should i do,so that authentication part is done once and all other transfers are being executed as the loop goes. |
yup! i did that.. might be helpful for others
just made my authentication function before start of while loop.. Code:
curl_easy_setopt(curl, CURLOPT_USERPWD, authentication); Code:
if(curl) { |
All times are GMT -5. The time now is 10:10 AM. |