i want to download a file using http
the attached code works fine.
but the code is not usable when
-> the file is missing in the server
-> or if proper permission is not given to access the file
even if the file is missing or with no proper permission...the error code says CURL_OK ie no error.
the file still gets downloaded, and in it there is html page of apache 404 error or 403 error
i googled for many times but could not come up with any solutions
anyone could could please help me with these queries
-> how to stop redirect?
-> how to first check the http status codes? and if its 200 then only download file or else display proper message to user?
-> what are the basics test i need to perform before and after downloading of file? (so that the file gets downloaded successfully)
could anyone please help me
with regards,
deepak