EnableExplicit ; perform an imap command to read the unseen message indicator from the Inbox #programName = "curl_imap_test.pb" #ProgramVersion = "1.0.x" ;!!!!!!!!!!!!!!You will need to change these to your own email !!!!!!!!!!!!!!!!!!!!! Define userName.s = "youremail@somedomaine.com" Define userPass.s = "yourPassword" Define curlLibraryName.s = "libcurl.dll" ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Define maxMsgLength.i = 10000000 Define *memoryArea = AllocateMemory(maxMsgLength) Global curlTotalReceived.i Global *curlMemoryArea = AllocateMemory(maxMsgLength) OpenConsole(#programName) ;===================================================================================================== ; curl include ;===================================================================================================== ; declare the procedures we will need Declare.i PBCurlEasySetOption(curlHandle.i, curlOption.i, curlParameterType.i, *curlParameter) Declare.i PBCurlWriteData(*passedPointer, sizeOfOneByte.i, sizeOfData.i, *notYetUsed) Declare.i PBCurlEasyPerform(curlHandle.i, *curlURL, *customRequest, *receiveAmount, *localMemArea) Declare.i FindInStringSSE42(baseStringPointer.i, subStringPointer.i, startPos.i) Global curlLibraryNumber.i ; open the curl library curlLibraryNumber = OpenLibrary(#PB_Any, curlLibraryName) If curlLibraryNumber = 0 PrintN("Unable to open '" + curlLibraryName + "', process must terminate") Input() End EndIf ; import the ws2_32 library needed ImportC "D:\Windows Kits\10\Lib\10.0.20348.0\um\x64\WS2_32.Lib" EndImport ; prototype the functions in libcurl_copy Prototype curl_easy_init() Prototype curl_easy_escape(curlLibraryNumber.i, lineText.s, lengthIn.i) Prototype curl_easy_unescape(curlLibraryNumber.i, lineText.s, lengthIn.i, *returnedLen) Prototype curl_easy_cleanup(handle.i) Prototype curl_easy_duphandle(handle.i) Prototype curl_easy_getinfo(curl.i, info_type.i, info.i) Prototype curl_easy_perform(handle.i) Prototype curl_easy_reset(handle.i) Prototype curl_easy_setopt(handle.i, option.i, pointer.i) Prototype curl_easy_strerror(errornum.i) Prototype curl_escape(url.i, length.i) Prototype curl_formadd(firstitem.i, lastitem.i) Prototype curl_formfree(form.i) Prototype curl_free(ptr.i) Prototype curl_getdate(datestring.i, now.i) Prototype curl_getenv(name.i) Prototype curl_global_cleanup() Prototype curl_global_init(flags.i) Prototype curl_global_init_mem(flags.i, m.i, f.i, r.i, s.i, c.i) Prototype curl_mprintf(format.i) Prototype curl_mfprintf(fd.i, format.i) Prototype curl_msprintf(buffer.i, format.i) Prototype curl_msnprintf(buffer.i, maxlength.i, format.i) Prototype curl_mvprintf(format.i, args.i) Prototype curl_mvfprintf(fd.i, format.i, args.i) Prototype curl_mvsprintf(buffer.i, format.i, args.i) Prototype curl_mvsnprintf(buffer.i, maxlength.i, format.i, args.i) Prototype curl_maprintf(format.i) Prototype curl_mvaprintf(format.i, args.i) Prototype curl_multi_add_handle(multi_handle.i, easy_handle.i) Prototype curl_multi_cleanup(multi_handle.i) Prototype curl_multi_fdset(multi_handle.i, read_fd_set.i, write_fd_set.i, exc_fd_set.i, max_fd.i) Prototype curl_multi_info_read(multi_handle.i, msgs_in_queue.i) Prototype curl_multi_init() Prototype curl_multi_perform(multi_handle.i, running_handles.i) Prototype curl_multi_remove_handle(multi_handle.i, easy_handle.i) Prototype curl_multi_strerror(errornum.i) Prototype curl_share_cleanup(share_handle.i) Prototype curl_share_init() Prototype curl_share_setopt(share.i, option.i, parameter.i) Prototype curl_share_strerror(errornum.i) Prototype curl_slist_append(slist.i, string.p-utf8) Prototype curl_slist_free_all(slist.i) Prototype curl_strequal(str1.i, str2.i) Prototype curl_strnequal(str1.i, str2.i, len.i) Prototype curl_unescape(url.i, length.i) Prototype curl_version() Prototype curl_version_info(type.i) Global curl_easy_init.curl_easy_init = GetFunction(curlLibraryNumber, "curl_easy_init") Global curl_easy_escape.curl_easy_escape = GetFunction(curlLibraryNumber, "curl_easy_escape") Global curl_easy_unescape.curl_easy_unescape = GetFunction(curlLibraryNumber, "curl_easy_unescape") Global curl_easy_cleanup.curl_easy_cleanup = GetFunction(curlLibraryNumber, "curl_easy_cleanup") Global curl_easy_duphandle.curl_easy_duphandle = GetFunction(curlLibraryNumber, "curl_easy_duphandle") Global curl_easy_getinfo.curl_easy_getinfo = GetFunction(curlLibraryNumber, "curl_easy_getinfo") Global curl_easy_perform.curl_easy_perform = GetFunction(curlLibraryNumber, "curl_easy_perform") Global curl_easy_reset.curl_easy_reset = GetFunction(curlLibraryNumber, "curl_easy_reset") Global curl_easy_setopt.curl_easy_setopt = GetFunction(curlLibraryNumber, "curl_easy_setopt") Global curl_easy_strerror.curl_easy_strerror = GetFunction(curlLibraryNumber, "curl_easy_strerror") Global curl_escape.curl_escape = GetFunction(curlLibraryNumber, "curl_escape") Global curl_formadd.curl_formadd = GetFunction(curlLibraryNumber, "curl_formadd") Global curl_formfree.curl_formfree = GetFunction(curlLibraryNumber, "curl_formfree") Global curl_free.curl_free = GetFunction(curlLibraryNumber, "curl_free") Global curl_getdate.curl_getdate = GetFunction(curlLibraryNumber, "curl_getdate") Global curl_getenv.curl_getenv = GetFunction(curlLibraryNumber, "curl_getenv") Global curl_global_cleanup.curl_global_cleanup = GetFunction(curlLibraryNumber, "curl_global_cleanup") Global curl_global_init.curl_global_init = GetFunction(curlLibraryNumber, "curl_global_init") Global curl_global_init_mem.curl_global_init_mem = GetFunction(curlLibraryNumber, "curl_global_init_mem") Global curl_mprintf.curl_mprintf = GetFunction(curlLibraryNumber, "curl_mprintf") Global curl_mfprintf.curl_mfprintf = GetFunction(curlLibraryNumber, "curl_mfprintf") Global curl_msprintf.curl_msprintf = GetFunction(curlLibraryNumber, "curl_msprintf") Global curl_msnprintf.curl_msnprintf = GetFunction(curlLibraryNumber, "curl_msnprintf") Global curl_mvprintf.curl_mvprintf = GetFunction(curlLibraryNumber, "curl_mvprintf") Global curl_mvfprintf.curl_mvfprintf = GetFunction(curlLibraryNumber, "curl_mvfprintf") Global curl_mvsprintf.curl_mvsprintf = GetFunction(curlLibraryNumber, "curl_mvsprintf") Global curl_mvsnprintf.curl_mvsnprintf = GetFunction(curlLibraryNumber, "curl_mvsnprintf") Global curl_maprintf.curl_maprintf = GetFunction(curlLibraryNumber, "curl_maprintf") Global curl_mvaprintf.curl_mvaprintf = GetFunction(curlLibraryNumber, "curl_mvaprintf") Global curl_multi_add_handle.curl_multi_add_handle = GetFunction(curlLibraryNumber, "curl_multi_add_handle") Global curl_multi_cleanup.curl_multi_cleanup = GetFunction(curlLibraryNumber, "curl_multi_cleanup") Global curl_multi_fdset.curl_multi_fdset = GetFunction(curlLibraryNumber, "curl_multi_fdset") Global curl_multi_info_read.curl_multi_info_read = GetFunction(curlLibraryNumber, "curl_multi_info_read") Global curl_multi_init.curl_multi_init = GetFunction(curlLibraryNumber, "curl_multi_init") Global curl_multi_perform.curl_multi_perform = GetFunction(curlLibraryNumber, "curl_multi_perform") Global curl_multi_remove_handle.curl_multi_remove_handle = GetFunction(curlLibraryNumber, "curl_multi_remove_handle") Global curl_multi_strerror.curl_multi_strerror = GetFunction(curlLibraryNumber, "curl_multi_strerror") Global curl_share_cleanup.curl_share_cleanup = GetFunction(curlLibraryNumber, "curl_share_cleanup") Global curl_share_init.curl_share_init = GetFunction(curlLibraryNumber, "curl_share_init") Global curl_share_setopt.curl_share_setopt = GetFunction(curlLibraryNumber, "curl_share_setopt") Global curl_share_strerror.curl_share_strerror = GetFunction(curlLibraryNumber, "curl_share_strerror") Global curl_slist_append.curl_slist_append = GetFunction(curlLibraryNumber, "curl_slist_append") Global curl_slist_free_all.curl_slist_free_all = GetFunction(curlLibraryNumber, "curl_slist_free_all") Global curl_strequal.curl_strequal = GetFunction(curlLibraryNumber, "curl_strequal") Global curl_strnequal.curl_strnequal = GetFunction(curlLibraryNumber, "curl_strnequal") Global curl_unescape.curl_unescape = GetFunction(curlLibraryNumber, "curl_unescape") Global curl_version.curl_version = GetFunction(curlLibraryNumber, "curl_version") Global curl_version_info.curl_version_info = GetFunction(curlLibraryNumber, "curl_version_info") Global quadTrue.i = 1 Global quadFalse.i = 0 Global longTrue.l = 1 Global longFalse.l = 0 ; libcurl_copy error numbers Enumeration 0 #CURLE_OK ; 0 #CURLE_UNSUPPORTED_PROTOCOL ; 1 #CURLE_FAILED_INIT ; 2 #CURLE_URL_MALFORMAT ; 3 #CURLE_URL_MALFORMAT_USER ; 4 - not used #CURLE_COULDNT_RESOLVE_PROXY ; 5 #CURLE_COULDNT_RESOLVE_HOST ; 6 #CURLE_COULDNT_CONNECT ; 7 #CURLE_FTP_WEIRD_SERVER_REPLY ; 8 #CURLE_FTP_ACCESS_DENIED ; 9 - service was denied by the FTP server due to lack of access - when login fails this is not returned #CURLE_FTP_USER_PASSWORD_INCORRECT ; 10 #CURLE_FTP_WEIRD_PASS_REPLY ; 11 #CURLE_FTP_WEIRD_USER_REPLY ; 12 #CURLE_FTP_WEIRD_PASV_REPLY ; 13 #CURLE_FTP_WEIRD_227_FORMAT ; 14 #CURLE_FTP_CANT_GET_HOST ; 15 #CURLE_FTP_CANT_RECONNECT ; 16 #CURLE_FTP_COULDNT_SET_BINARY ; 17 #CURLE_PARTIAL_FILE ; 18 #CURLE_FTP_COULDNT_RETR_FILE ; 19 #CURLE_FTP_WRITE_ERROR ; 20 #CURLE_QUOTE_ERROR ; 21 #CURLE_HTTP_RETURNED_ERROR ; 22 #CURLE_WRITE_ERROR ; 23 #CURLE_MALFORMAT_USER ; 24 - not used #CURLE_FTP_COULDNT_STOR_FILE ; 25 - failed FTP upload #CURLE_READ_ERROR ; 26 - could not open/read from file #CURLE_OUT_OF_MEMORY ; 27 #CURLE_OPERATION_TIMEOUTED ; 28 - the timeout time was reached #CURLE_FTP_COULDNT_SET_ASCII ; 29 - type Ascii failed #CURLE_FTP_PORT_FAILED ; 30 - FTP port operation failed #CURLE_FTP_COULDNT_USE_REST ; 31 - the REST command failed #CURLE_FTP_COULDNT_GET_SIZE ; 32 - the SIZE command failed #CURLE_HTTP_RANGE_ERROR ; 33 - range command did not work #CURLE_HTTP_POST_ERROR ; 34 #CURLE_SSL_CONNECT_ERROR ; 35 - error when connecting with SSL #CURLE_BAD_DOWNLOAD_RESUME ; 36 - couldn't resume download #CURLE_FILE_COULDNT_READ_FILE ; 37 #CURLE_LDAP_CANNOT_BIND ; 38 #CURLE_LDAP_SEARCH_FAILED ; 39 #CURLE_LIBRARY_NOT_FOUND ; 40 #CURLE_FUNCTION_NOT_FOUND ; 41 #CURLE_ABORTED_BY_CALLBACK ; 42 #CURLE_BAD_FUNCTION_ARGUMENT ; 43 #CURLE_BAD_CALLING_ORDER ; 44 - not used #CURLE_INTERFACE_FAILED ; 45 - CURLOPT_INTERFACE failed #CURLE_BAD_PASSWORD_ENTERED ; 46 - not used #CURLE_TOO_MANY_REDIRECTS ; 47 - catch endless re-direct loops #CURLE_UNKNOWN_TELNET_OPTION ; 48 - User specified an unknown option #CURLE_TELNET_OPTION_SYNTAX ; 49 - malformed telnet option #CURLE_OBSOLETE ; 50 - not used #CURLE_SSL_PEER_CERTIFICATE ; 51 - peer's certificate invalid #CURLE_GOT_NOTHING ; 52 - when this is a specific error #CURLE_SSL_ENGINE_NOTFOUND ; 53 - SSL crypto engine not found #CURLE_SSL_ENGINE_SETFAILED ; 54 - cannot set SSL crypto engine as Default #CURLE_SEND_ERROR ; 55 - failed sending network Data #CURLE_RECV_ERROR ; 56 - failure in receiving network Data #CURLE_SHARE_IN_USE ; 57 - share is already in use #CURLE_SSL_CERTPROBLEM ; 58 - problem with the local certificate #CURLE_SSL_CIPHER ; 59 - couldn't use specified cipher #CURLE_SSL_CACERT ; 60 - problem with the CA cert (path?) #CURLE_BAD_CONTENT_ENCODING ; 61 - unrecognized transfer encoding #CURLE_LDAP_INVALID_URL ; 62 - invalid LDAP URL #CURLE_FILESIZE_EXCEEDED ; 63 - maximum file size exceeded #CURLE_FTP_SSL_FAILED ; 64 - requested FTP SSL level failed #CURLE_SEND_FAIL_REWIND ; 65 - sending the Data requires a rewind that failed #CURLE_SSL_ENGINE_INITFAILED ; 66 - failed to initialise ENGINE #CURLE_LOGIN_DENIED ; 67 - username or password was invalid #CURLE_TFTP_NOTFOUND ; 68 - file not found on server #CURLE_TFTP_PERM ; 69 - permission problem on server #CURLE_TFTP_DISKFULL ; 70 - out of disk space on server #CURLE_TFTP_ILLEGAL ; 71 - illegal TFTP operation #CURLE_TFTP_UNKNOWNID ; 72 - unknown transfer ID #CURLE_TFTP_EXISTS ; 73 - file already exists #CURLE_TFTP_NOSUCHUSER ; 74 - no such user #CURLE_CONV_FAILED ; 75 - conversion failed #CURLE_CONV_REQD ; 76 - caller must register conversion callbacks using curl_easy_setopt options: CURLOPT_CONV_FROM_NETWORK_FUNCTION, CURLOPT_CONV_TO_NETWORK_FUNCTION, and CURLOPT_CONV_FROM_UTF8_FUNCTION #CURLE_SSL_CACERT_BADFILE ; 77 - could not load CACERT file, missing or wrong format #CURLE_REMOTE_FILE_NOT_FOUND ; 78 - remote file not found #CURLE_SSH ; 79 - error from the SSH layer, somewhat generic so the error message will be of interest when this has happened #CURLE_SSL_SHUTDOWN_FAILED ; 80 - failed to shut down the SSL connection #CURLE_AGAIN ; 81 - socket is not ready for send/recv, wait till it's ready and try again (Added in 7.18.2) #CURLE_SSL_CRL_BADFILE ; 82 - could not load CRL file, missing or wrong format (Added in 7.19.0) #CURLE_SSL_ISSUER_ERROR ; 83 - issuer check failed. (Added in 7.19.0) #CURLE_FTP_PRET_FAILED ; 84 - a PRET command failed #CURLE_RTSP_CSEQ_ERROR ; 85 - mismatch of RTSP CSeq numbers #CURLE_RTSP_SESSION_ERROR ; 86 - mismatch of RTSP Session Ids #CURLE_FTP_BAD_FILE_LIST ; 87 - unable to parse FTP file list #CURLE_CHUNK_FAILED ; 88 - chunk callback reported error #CURLE_NO_CONNECTION_AVAILABLE ; 89 - no connection available, the session will be queued #CURLE_SSL_PINNEDPUBKEYNOTMATCH ; 90 - specified pinned public key did not match #CURLE_SSL_INVALIDCERTSTATUS ; 91 - invalid certificate status #CURLE_HTTP2_STREAM ; 92 - stream error in HTTP/2 framing layer #CURLE_RECURSIVE_API_CALL ; 93 - an api function was called from inside a callback #CURLE_AUTH_ERROR ; 94 - an authentication function returned an error #CURLE_HTTP3 ; 95 - an HTTP/3 layer problem #CURLE_QUIC_CONNECT_ERROR ; 96 - QUIC connection error #CURLE_LAST_ERROR_ENUMERATED ; 97 - Last current error enumerated EndEnumeration Global Dim curleMessages.s(#CURLE_LAST_ERROR_ENUMERATED) curleMessages(#CURLE_OK) = "0 - CURLE_OK" curleMessages(#CURLE_UNSUPPORTED_PROTOCOL) = "1 - CURLE_UNSUPPORTED_PROTOCOL" curleMessages(#CURLE_FAILED_INIT) = "2 - CURLE_FAILED_INIT" curleMessages(#CURLE_URL_MALFORMAT) = "3 - CURLE_URL_MALFORMAT" curleMessages(#CURLE_URL_MALFORMAT_USER) = "4 - CURLE_URL_MALFORMAT_USER" curleMessages(#CURLE_COULDNT_RESOLVE_PROXY) = "5 - CURLE_COULDNT_RESOLVE_PROXY" curleMessages(#CURLE_COULDNT_RESOLVE_HOST) = "6 - CURLE_COULDNT_RESOLVE_HOST" curleMessages(#CURLE_COULDNT_CONNECT) = "7 - CURLE_COULDNT_CONNECT" curleMessages(#CURLE_FTP_WEIRD_SERVER_REPLY) = "8 - CURLE_FTP_WEIRD_SERVER_REPLY" curleMessages(#CURLE_FTP_ACCESS_DENIED) = "9 - CURLE_FTP_ACCESS_DENIED" curleMessages(#CURLE_FTP_USER_PASSWORD_INCORRECT) = "10 - CURLE_FTP_USER_PASSWORD_INCORRECT" curleMessages(#CURLE_FTP_WEIRD_PASS_REPLY) = "11 - CURLE_FTP_WEIRD_PASS_REPLY" curleMessages(#CURLE_FTP_WEIRD_USER_REPLY) = "12 - CURLE_FTP_WEIRD_USER_REPLY" curleMessages(#CURLE_FTP_WEIRD_PASV_REPLY) = "13 - CURLE_FTP_WEIRD_PASV_REPLY" curleMessages(#CURLE_FTP_WEIRD_227_FORMAT) = "14 - CURLE_FTP_WEIRD_227_FORMAT" curleMessages(#CURLE_FTP_CANT_GET_HOST) = "15 - CURLE_FTP_CANT_GET_HOST" curleMessages(#CURLE_FTP_CANT_RECONNECT) = "16 - CURLE_FTP_CANT_RECONNECT" curleMessages(#CURLE_FTP_COULDNT_SET_BINARY) = "17 - CURLE_FTP_COULDNT_SET_BINARY" curleMessages(#CURLE_PARTIAL_FILE) = "18 - CURLE_PARTIAL_FILE" curleMessages(#CURLE_FTP_COULDNT_RETR_FILE) = "19 - CURLE_FTP_COULDNT_RETR_FILE" curleMessages(#CURLE_FTP_WRITE_ERROR) = "20 - CURLE_FTP_WRITE_ERROR" curleMessages(#CURLE_QUOTE_ERROR) = "21 - CURLE_QUOTE_ERROR or error in #CURLOPT_CUSTOMREQUEST" curleMessages(#CURLE_HTTP_RETURNED_ERROR) = "22 - CURLE_HTTP_RETURNED_ERROR" curleMessages(#CURLE_WRITE_ERROR) = "23 - CURLE_WRITE_ERROR" curleMessages(#CURLE_MALFORMAT_USER) = "24 - CURLE_MALFORMAT_USER" curleMessages(#CURLE_FTP_COULDNT_STOR_FILE) = "25 - CURLE_FTP_COULDNT_STOR_FILE - failed FTP upload" curleMessages(#CURLE_READ_ERROR) = "26 - CURLE_READ_ERROR - could open/read from file" curleMessages(#CURLE_OUT_OF_MEMORY) = "27 - CURLE_OUT_OF_MEMORY" curleMessages(#CURLE_OPERATION_TIMEOUTED) = "28 - Timeout was reached" curleMessages(#CURLE_FTP_COULDNT_SET_ASCII) = "29 - TYPE A failed" curleMessages(#CURLE_FTP_PORT_FAILED) = "30 - FTP PORT operation failed" curleMessages(#CURLE_FTP_COULDNT_USE_REST) = "31 - REST command failed" curleMessages(#CURLE_FTP_COULDNT_GET_SIZE) = "32 - SIZE command failed" curleMessages(#CURLE_HTTP_RANGE_ERROR) = "33 - RANGE 'command' failed'" curleMessages(#CURLE_HTTP_POST_ERROR) = "34 - CURLE_HTTP_POST_ERROR" curleMessages(#CURLE_SSL_CONNECT_ERROR) = "35 - SSL conection error" curleMessages(#CURLE_BAD_DOWNLOAD_RESUME) = "36 - Couldn't resume download" curleMessages(#CURLE_FILE_COULDNT_READ_FILE) = "37 - CURLE_FILE_COULDNT_READ_FILE" curleMessages(#CURLE_LDAP_CANNOT_BIND) = "38 - CURLE_LDAP_CANNOT_BIND" curleMessages(#CURLE_LDAP_SEARCH_FAILED) = "39 - CURLE_LDAP_SEARCH_FAILED" curleMessages(#CURLE_LIBRARY_NOT_FOUND) = "40 - CURLE_LIBRARY_NOT_FOUND" curleMessages(#CURLE_FUNCTION_NOT_FOUND) = "41 - CURLE_FUNCTION_NOT_FOUND" curleMessages(#CURLE_ABORTED_BY_CALLBACK) = "42 - CURLE_ABORTED_BY_CALLBACK" curleMessages(#CURLE_BAD_FUNCTION_ARGUMENT) = "43 - CURLE_BAD_FUNCTION_ARGUMENT" curleMessages(#CURLE_BAD_CALLING_ORDER) = "44 - CURLE_BAD_CALLING_ORDER" curleMessages(#CURLE_INTERFACE_FAILED) = "45 - CURLOPT_INTERFACE failed" curleMessages(#CURLE_BAD_PASSWORD_ENTERED) = "46 - CURLE_BAD_PASSWORD_ENTERED" curleMessages(#CURLE_TOO_MANY_REDIRECTS) = "47 - CURLE_TOO_MANY_REDIRECTS - catch endless re-direct loops" curleMessages(#CURLE_UNKNOWN_TELNET_OPTION) = "48 - User specified an unknown option" curleMessages(#CURLE_TELNET_OPTION_SYNTAX) = "49 - Malformed telnet option" curleMessages(#CURLE_OBSOLETE) = "50 - CURLE_OBSOLETE" curleMessages(#CURLE_SSL_PEER_CERTIFICATE) = "51 - Peer's certificate incorrect or invalid" curleMessages(#CURLE_GOT_NOTHING) = "52 - CURLE_GOT_NOTHING" curleMessages(#CURLE_SSL_ENGINE_NOTFOUND) = "53 - SSL crypto engine not found" curleMessages(#CURLE_SSL_ENGINE_SETFAILED) = "54 - Can not set SSL crypto engine As Default" curleMessages(#CURLE_SEND_ERROR) = "55 - Failed sending network Data" curleMessages(#CURLE_RECV_ERROR) = "56 - Failure in receiving network Data" curleMessages(#CURLE_SHARE_IN_USE) = "57 - Share is in use" curleMessages(#CURLE_SSL_CERTPROBLEM) = "58 - Problem with the local certificate" curleMessages(#CURLE_SSL_CIPHER) = "59 - Couldn't use specified cipher" curleMessages(#CURLE_SSL_CACERT) = "60 - Problem with the CA cert (path?)" curleMessages(#CURLE_BAD_CONTENT_ENCODING) = "61 - Unrecognized transfer encoding" curleMessages(#CURLE_LDAP_INVALID_URL) = "62 - Invalid LDAP URL" curleMessages(#CURLE_FILESIZE_EXCEEDED) = "63 - Maximum file size exceeded" curleMessages(#CURLE_FTP_SSL_FAILED) = "64 - Requested FTP SSL level failed" curleMessages(#CURLE_SEND_FAIL_REWIND) = "65 - Sending the Data requires a rewind that failed" curleMessages(#CURLE_SSL_ENGINE_INITFAILED) = "66 - Failed to initialise ENGINE" curleMessages(#CURLE_LOGIN_DENIED) = "67 - Username or password failure" curleMessages(#CURLE_TFTP_NOTFOUND) = "68 - File not found on server" curleMessages(#CURLE_TFTP_PERM) = "69 - Permission problem on server" curleMessages(#CURLE_TFTP_DISKFULL) = "70 - Out of disk space on server" curleMessages(#CURLE_TFTP_ILLEGAL) = "71 - Illegal TFTP operation" curleMessages(#CURLE_TFTP_UNKNOWNID) = "72 - Unknown transfer ID" curleMessages(#CURLE_TFTP_EXISTS) = "73 - File already exists" curleMessages(#CURLE_TFTP_NOSUCHUSER) = "74 - No such user" curleMessages(#CURLE_CONV_FAILED) = "75 - Conversion failed" curleMessages(#CURLE_CONV_REQD) = "76 - Caller must register conversion callbacks using curl_easy_setopt options: CURLOPT_CONV_FROM_NETWORK_FUNCTION, CURLOPT_CONV_TO_NETWORK_FUNCTION, and CURLOPT_CONV_FROM_UTF8_FUNCTION" curleMessages(#CURLE_SSL_CACERT_BADFILE) = "77 - Could not load CACERT file, missing or wrong format" curleMessages(#CURLE_REMOTE_FILE_NOT_FOUND) = "78 - Remote file not found" curleMessages(#CURLE_SSH) = "79 - Error from the SSH layer, somewhat generic so the error message will be of interest when this has happened" curleMessages(#CURLE_SSL_SHUTDOWN_FAILED) = "80 - Failed to shut down the SSL connection" curleMessages(#CURLE_AGAIN) = "81 - Socket is not ready for send/recv, wait till it's ready and try again" curleMessages(#CURLE_SSL_CRL_BADFILE) = "82 - Could not load CRL file, missing or wrong format" curleMessages(#CURLE_SSL_ISSUER_ERROR) = "83 - Issuer check failed" curleMessages(#CURLE_FTP_PRET_FAILED) = "84 - PRET command failed" curleMessages(#CURLE_RTSP_CSEQ_ERROR) = "85 - Mismatch of RTSP CSeq numbers" curleMessages(#CURLE_RTSP_SESSION_ERROR) = "86 - Mismatch of RTSP Session Ids" curleMessages(#CURLE_FTP_BAD_FILE_LIST) = "87 - Unable to parse FTP file list" curleMessages(#CURLE_CHUNK_FAILED) = "88 - Chunk callback reported error" curleMessages(#CURLE_NO_CONNECTION_AVAILABLE) = "89 - No connection available, the session will be queued" curleMessages(#CURLE_SSL_PINNEDPUBKEYNOTMATCH) = "90 - Specified pinned public key did not match" curleMessages(#CURLE_SSL_INVALIDCERTSTATUS) = "91 - Invalid certificate status" curleMessages(#CURLE_HTTP2_STREAM) = "92 - Stream error in HTTP/2 framing layer" curleMessages(#CURLE_RECURSIVE_API_CALL) = "93 - An api function was called from inside a callback" curleMessages(#CURLE_AUTH_ERROR) = "94 - An authentication function returned an error" curleMessages(#CURLE_HTTP3) = "95 - An HTTP/3 layer problem" curleMessages(#CURLE_QUIC_CONNECT_ERROR) = "96 - QUIC connection error" curleMessages(#CURLE_LAST_ERROR_ENUMERATED) = "97 - Last current error enumerated" ; enumerate the curl option types Enumeration 0 #CURL_TYPE_INTEGER #CURL_TYPE_LONG #CURL_TYPE_FLOAT #CURL_TYPE_DOUBLE #CURL_TYPE_POINTER #CURL_TYPE_NULL #CURL_TYPE_UTF8 #CURL_TYPE_ASCII #CURL_TYPE_UNICODE EndEnumeration Enumeration 0 ; curlsocktype #CURLSOCKTYPE_IPCXN ; socket created For a specific IP connection #CURLSOCKTYPE_LAST ; never use EndEnumeration Enumeration ; curlioerr #CURLIOE_OK ; I/O operation successful #CURLIOE_UNKNOWNCMD ; command was unknown to callback #CURLIOE_FAILRESTART ; failed to restart the Read #CURLIOE_LAST ; never use EndEnumeration Enumeration ; curliocmd #CURLIOCMD_NOP ; no operation #CURLIOCMD_RESTARTREAD ; restart the Read stream from start #CURLIOCMD_LAST ; never use EndEnumeration Enumeration 0 ; curl_infotype ; the kind of Data that is passed to information_callback #CURLINFO_TEXT #CURLINFO_HEADER_IN ; 1 #CURLINFO_HEADER_OUT ; 2 #CURLINFO_DATA_IN ; 3 #CURLINFO_DATA_OUT ; 4 #CURLINFO_SSL_DATA_IN ; 5 #CURLINFO_SSL_DATA_OUT ; 6 #CURLINFO_END EndEnumeration Enumeration ; curl_proxytype #CURLPROXY_HTTP = 0 #CURLPROXY_SOCKS4 = 4 #CURLPROXY_SOCKS5 = 5 EndEnumeration Enumeration ; curl_usessl ; parameter For the CURLOPT_USE_SSL option #CURLUSESSL_NONE ; do not attempt to use SSL #CURLUSESSL_TRY ; try using SSL proceed anyway otherwise #CURLUSESSL_CONTROL ; SSL For the control connection Or fail #CURLUSESSL_ALL ; SSL For all communication Or fail #CURLUSESSL_LAST ; Not an option never use EndEnumeration ; Enumeration ; curl_ftpccc ; parameter For the CURLOPT_FTP_SSL_CCC option #CURLFTPSSL_CCC_NONE ; do not send CCC #CURLFTPSSL_CCC_PASSIVE ; Let the server initiate the shutdown #CURLFTPSSL_CCC_ACTIVE ; Initiate the shutdown #CURLFTPSSL_CCC_LAST ; Not an option never use EndEnumeration Enumeration ; curl_ftpauth ; parameter For the CURLOPT_FTPSSLAUTH option #CURLFTPAUTH_DEFAULT ; let libcurl_copy decide #CURLFTPAUTH_SSL ; use "AUTH SSL" #CURLFTPAUTH_TLS ; use "AUTH TLS" #CURLFTPAUTH_LAST ; Not an option never use EndEnumeration Enumeration ; curl_ftpmethod ; parameter For the CURLOPT_FTP_FILEMETHOD option #CURLFTPMETHOD_DEFAULT ; let libcurl_copy pick #CURLFTPMETHOD_MULTICWD ; single CWD operation For each path part #CURLFTPMETHOD_NOCWD ; no CWD at all #CURLFTPMETHOD_SINGLECWD ; one CWD to full dir then work on file #CURLFTPMETHOD_LAST ; Not an option never use EndEnumeration Enumeration ; curl_http ; These enums are For use With the CURLOPT_HTTP_VERSION option. #CURL_HTTP_VERSION_NONE ; setting this means we don't care and that we'd ; like the library to choose the best possible for us! #CURL_HTTP_VERSION_1_0 ; please use HTTP 1.0 in the request #CURL_HTTP_VERSION_1_1 ; please use HTTP 1.1 in the request #CURL_HTTP_VERSION_LAST ; *ILLEGAL* http version EndEnumeration Enumeration ; curl_NETRC_OPTION ; These enums are For use With the CURLOPT_NETRC option. #CURL_NETRC_IGNORED ; The .netrc will never be read. ; This is the Default. #CURL_NETRC_OPTIONAL ; A user:password in the URL will be preferred to one in the .netrc. #CURL_NETRC_REQUIRED ; A user:password in the URL will be ignored. ; Unless one is set programmatically the .netrc will be queried. #CURL_NETRC_LAST EndEnumeration Enumeration ; curl_sslversion #CURL_SSLVERSION_DEFAULT #CURL_SSLVERSION_TLSv1 #CURL_SSLVERSION_SSLv2 #CURL_SSLVERSION_SSLv3 #CURL_SSLVERSION_LAST ; never use keep last EndEnumeration Enumeration ; curl_TimeCond #CURL_TIMECOND_NONE #CURL_TIMECOND_IFMODSINCE #CURL_TIMECOND_IFUNMODSINCE #CURL_TIMECOND_LASTMOD #CURL_TIMECOND_LAST EndEnumeration ; Enumeration ; curlformoption #CURLFORM_NOTHING ; the first one is unused #CURLFORM_COPYNAME #CURLFORM_PTRNAME #CURLFORM_NAMELENGTH #CURLFORM_COPYCONTENTS #CURLFORM_PTRCONTENTS #CURLFORM_CONTENTSLENGTH #CURLFORM_FILECONTENT #CURLFORM_ARRAY #CURLFORM_OBSOLETE #CURLFORM_FILE #CURLFORM_BUFFER #CURLFORM_BUFFERPTR #CURLFORM_BUFFERLENGTH #CURLFORM_CONTENTTYPE #CURLFORM_CONTENTHEADER #CURLFORM_FILENAME #CURLFORM_End #CURLFORM_OBSOLETE2 #CURLFORM_LASTENTRY ; the last unusued EndEnumeration Enumeration ; CURLFORMcode #CURL_FORMADD_OK ; first no error #CURL_FORMADD_MEMORY #CURL_FORMADD_OPTION_TWICE #CURL_FORMADD_NULL #CURL_FORMADD_UNKNOWN_OPTION #CURL_FORMADD_INCOMPLETE #CURL_FORMADD_ILLEGAL_ARRAY #CURL_FORMADD_DISABLED ; libcurl_copy was built With this disabled #CURL_FORMADD_LAST ; last EndEnumeration Enumeration ; CURL_closepolicy #CURLCLOSEPOLICY_NONE ; first never use this #CURLCLOSEPOLICY_OLDEST #CURLCLOSEPOLICY_LEAST_RECENTLY_USED #CURLCLOSEPOLICY_LEAST_TRAFFIC #CURLCLOSEPOLICY_SLOWEST #CURLCLOSEPOLICY_CALLBACK #CURLCLOSEPOLICY_LAST ; last never use this EndEnumeration Enumeration 0 ; CURL_lock_data #CURL_LOCK_DATA_NONE #CURL_LOCK_DATA_SHARE #CURL_LOCK_DATA_COOKIE #CURL_LOCK_DATA_DNS #CURL_LOCK_DATA_SSL_SESSION #CURL_LOCK_DATA_CONNECT #CURL_LOCK_DATA_LAST EndEnumeration ; ; Different lock access types Enumeration ; CURL_lock_access #CURL_LOCK_ACCESS_NONE = 0 ; unspecified action #CURL_LOCK_ACCESS_SHARED = 1 ; For Read perhaps #CURL_LOCK_ACCESS_SINGLE = 2 ; For write perhaps #CURL_LOCK_ACCESS_LAST ; never use EndEnumeration ; Enumeration ; CURLSHcode #CURLSHE_OK ; all is fine #CURLSHE_BAD_OPTION ; 1 #CURLSHE_IN_USE ; 2 #CURLSHE_INVALID ; 3 #CURLSHE_NOMEM ; out of memory #CURLSHE_LAST ; never use EndEnumeration Enumeration ; CURLSHoption #CURLSHOPT_NONE ; don't use #CURLSHOPT_SHARE ; specify a Data type To share #CURLSHOPT_UNSHARE ; specify shich Data type To stop sharing #CURLSHOPT_LOCKFUNC ; pass in a '#CURL_lock_function' pointer #CURLSHOPT_UNLOCKFUNC ; pass in a '#CURL_unlock_function' pointer #CURLSHOPT_USERDATA ; pass in a user Data pointer used in the lock/unlock callback functions #CURLSHOPT_LAST ; never use EndEnumeration Enumeration ; CURLversion #CURLVERSION_FIRST #CURLVERSION_SECOND #CURLVERSION_THIRD #CURLVERSION_FOURTH #CURLVERSION_LAST ; never actually use this EndEnumeration #CURL_IPRESOLVE_WHATEVER = 0 ; Default resolves addresses To all IP versions that your system allows #CURL_IPRESOLVE_V4 = 1 ; resolve To ipv4 addresses #CURL_IPRESOLVE_V6 = 2 ; resolve To ipv6 addresses #CURLOPT_HTTPREQUEST = -1 #CURLOPT_MUTE = -2 #CURLOPT_PASSWDFUNCTION = -3 #CURLOPT_PASSWDDATA = -4 #CURLOPT_CLOSEFUNCTION = -5 #CURLOPT_SOURCE_HOST = -6 #CURLOPT_SOURCE_PATH = -7 #CURLOPT_SOURCE_PORT = -8 #CURLOPT_PASV_HOST = -9 #CURLOPT_INFILESIZE = 00014 #CURLOPT_VERBOSE = 00041 #CURLOPT_HEADER = 00042 #CURLOPT_UPLOAD = 00046 #CURLOPT_FOLLOWLOCATION = 00052 #CURLOPT_SSL_VERIFYPEER = 00064 #CURLOPT_SSL_VERIFYHOST = 00081 #CURLOPT_IGNORE_CONTENT_LENGTH= 00136 #CURLOPT_FILE = 10001 #CURLOPT_URL = 10002 #CURLOPT_USERPWD = 10005 #CURLOPT_INFILE = 10009 #CURLOPT_WRITEHEADER = 10029 #CURLOPT_POSTQUOTE = 10039 #CURLOPT_INFILESIZE_LARGE = 30115 #CURLOPTTYPE_OBJECTPOINT = 10000 #CURLOPT_POSTFIELDS = #CURLOPTTYPE_OBJECTPOINT + 15 #CURLOPTTYPE_FUNCTIONPOINT = 20000 #CURLOPT_ERRORBUFFER = #CURLOPTTYPE_OBJECTPOINT + 10 #CURLOPT_WRITEFUNCTION = #CURLOPTTYPE_FUNCTIONPOINT + 11 #CURLOPT_HEADERFUNCTION = #CURLOPTTYPE_FUNCTIONPOINT + 79 ; three convenient "aliases" that follow the name scheme better #CURLOPT_WRITEDATA = #CURLOPT_FILE #CURLOPT_READDATA = #CURLOPT_INFILE #CURLOPT_HEADERDATA = #CURLOPT_WRITEHEADER #CURL_GLOBAL_ALL = $00000003 #CURL_GLOBAL_DEFAULT = $00000003 #CURL_MAX_WRITE_SIZE = 16384 #CURL_READFUNC_ABORT = $10000000 ;{ #CURLINFO #CURLINFO_STRING = $100000 #CURLINFO_LONG = $200000 #CURLINFO_DOUBLE = $300000 #CURLINFO_SLIST = $400000 #CURLINFO_PTR = $400000; /* same as SLIST */ #CURLINFO_SOCKET = $500000 #CURLINFO_OFF_T = $600000 #CURLINFO_MASK = $0fffff #CURLINFO_TYPEMASK = $f00000 #CURLINFO_EFFECTIVE_URL = #CURLINFO_STRING + 1 #CURLINFO_RESPONSE_CODE = #CURLINFO_LONG + 2 #CURLINFO_TOTAL_TIME = #CURLINFO_DOUBLE + 3 #CURLINFO_NAMELOOKUP_TIME = #CURLINFO_DOUBLE + 4 #CURLINFO_CONNECT_TIME = #CURLINFO_DOUBLE + 5 #CURLINFO_PRETRANSFER_TIME = #CURLINFO_DOUBLE + 6 #CURLINFO_SIZE_UPLOAD = #CURLINFO_DOUBLE + 7 #CURLINFO_SIZE_DOWNLOAD = #CURLINFO_DOUBLE + 8 #CURLINFO_SPEED_DOWNLOAD = #CURLINFO_DOUBLE + 9 #CURLINFO_SPEED_UPLOAD = #CURLINFO_DOUBLE + 10 #CURLINFO_HEADER_SIZE = #CURLINFO_LONG + 11 #CURLINFO_REQUEST_SIZE = #CURLINFO_LONG + 12 #CURLINFO_SSL_VERIFYRESULT = #CURLINFO_LONG + 13 #CURLINFO_FILETIME = #CURLINFO_LONG + 14 #CURLINFO_CONTENT_LENGTH_DOWNLOAD = #CURLINFO_DOUBLE + 15 #CURLINFO_CONTENT_LENGTH_UPLOAD = #CURLINFO_DOUBLE + 16 #CURLINFO_STARTTRANSFER_TIME = #CURLINFO_DOUBLE + 17 #CURLINFO_CONTENT_TYPE = #CURLINFO_STRING + 18 #CURLINFO_REDIRECT_TIME = #CURLINFO_DOUBLE + 19 #CURLINFO_REDIRECT_COUNT = #CURLINFO_LONG + 20 #CURLINFO_PRIVATE = #CURLINFO_STRING + 21 #CURLINFO_HTTP_CONNECTCODE = #CURLINFO_LONG + 22 #CURLINFO_HTTPAUTH_AVAIL = #CURLINFO_LONG + 23 #CURLINFO_PROXYAUTH_AVAIL = #CURLINFO_LONG + 24 #CURLINFO_OS_ERRNO = #CURLINFO_LONG + 25 #CURLINFO_NUM_CONNECTS = #CURLINFO_LONG + 26 #CURLINFO_SSL_ENGINES = #CURLINFO_SLIST + 27 #CURLINFO_COOKIELIST = #CURLINFO_SLIST + 28 #CURLINFO_LASTSOCKET = #CURLINFO_LONG + 29 #CURLINFO_FTP_ENTRY_PATH = #CURLINFO_STRING + 30 #CURLINFO_REDIRECT_URL = #CURLINFO_STRING + 31 #CURLINFO_PRIMARY_IP = #CURLINFO_STRING + 32 #CURLINFO_APPCONNECT_TIME = #CURLINFO_DOUBLE + 33 #CURLINFO_CERTINFO = #CURLINFO_PTR + 34 #CURLINFO_CONDITION_UNMET = #CURLINFO_LONG + 35 #CURLINFO_RTSP_SESSION_ID = #CURLINFO_STRING + 36 #CURLINFO_RTSP_CLIENT_CSEQ = #CURLINFO_LONG + 37 #CURLINFO_RTSP_SERVER_CSEQ = #CURLINFO_LONG + 38 #CURLINFO_RTSP_CSEQ_RECV = #CURLINFO_LONG + 39 #CURLINFO_PRIMARY_PORT = #CURLINFO_LONG + 40 #CURLINFO_LOCAL_IP = #CURLINFO_STRING + 41 #CURLINFO_LOCAL_PORT = #CURLINFO_LONG + 42 #CURLINFO_TLS_SESSION = #CURLINFO_PTR + 43 #CURLINFO_ACTIVESOCKET = #CURLINFO_SOCKET + 44 #CURLINFO_TLS_SSL_PTR = #CURLINFO_PTR + 45 #CURLINFO_HTTP_VERSION = #CURLINFO_LONG + 46 #CURLINFO_PROXY_SSL_VERIFYRESULT = #CURLINFO_LONG + 47 #CURLINFO_PROTOCOL = #CURLINFO_LONG + 48 #CURLINFO_SCHEME = #CURLINFO_STRING + 49 #CURLINFO_TOTAL_TIME_T = #CURLINFO_OFF_T + 50 #CURLINFO_NAMELOOKUP_TIME_T = #CURLINFO_OFF_T + 51 #CURLINFO_CONNECT_TIME_T = #CURLINFO_OFF_T + 52 #CURLINFO_PRETRANSFER_TIME_T = #CURLINFO_OFF_T + 53 #CURLINFO_STARTTRANSFER_TIME_T = #CURLINFO_OFF_T + 54 #CURLINFO_REDIRECT_TIME_T = #CURLINFO_OFF_T + 55 #CURLINFO_APPCONNECT_TIME_T = #CURLINFO_OFF_T + 56 #CURLINFO_RETRY_AFTER = #CURLINFO_OFF_T + 57 #CURLINFO_EFFECTIVE_METHOD = #CURLINFO_STRING + 58 #CURLINFO_LASTONE = 58 #CURLINFO_HTTP_CODE = #CURLINFO_RESPONSE_CODE #CURLOPTTYPE_LONG = 0 #CURLOPTTYPE_OBJECTPOINT = 10000 #CURLOPTTYPE_FUNCTIONPOINT = 20000 #CURLOPTTYPE_OFF_T = 30000 #CURLOPTTYPE_BLOB = 40000 ; handy aliases that make no run-time difference */ #CURLOPTTYPE_STRINGPOINT = #CURLOPTTYPE_OBJECTPOINT #CURLOPTTYPE_SLISTPOINT = #CURLOPTTYPE_OBJECTPOINT ; This Macro-mania below setups the CURLOPT_[what] enum + To be used with curl_easy_setopt(). The first argument in the CURLOPT_) Macro is the [what] word. #CURLOPT_MAIL_FROM = #CURLOPTTYPE_OBJECTPOINT + 186 #CURLOPT_MAIL_RCPT = #CURLOPTTYPE_OBJECTPOINT + 187 ; This is the FILE;Or void;the regular output should be written To. #CURLOPT_FILE = #CURLOPTTYPE_OBJECTPOINT + 1 ; The full URL To get/put #CURLOPT_URL= #CURLOPTTYPE_OBJECTPOINT + 2 ; Port number To connect To + If other than Default. #CURLOPT_PORT= #CURLOPTTYPE_LONG + 3 ; Name of proxy To use. #CURLOPT_PROXY= #CURLOPTTYPE_OBJECTPOINT + 4 ; "name:password" To use when fetching. #CURLOPT_USERPWD= #CURLOPTTYPE_OBJECTPOINT + 5 ; "name:password" To use With proxy. #CURLOPT_PROXYUSERPWD= #CURLOPTTYPE_OBJECTPOINT + 6 ; Range To get + specified As an ASCII string. #CURLOPT_RANGE= #CURLOPTTYPE_OBJECTPOINT + 7 ; Specified file stream To upload from (use As input): #CURLOPT_INFILE= #CURLOPTTYPE_OBJECTPOINT + 9 ; Buffer To receive error messages in + must be at least CURL_ERROR_SIZE bytes big. If this is not used + error messages go To stderr instead: #CURLOPT_ERRORBUFFER= #CURLOPTTYPE_OBJECTPOINT + 10 ; Function that will be called To store the output (instead of fwrite). The parameters will use fwrite() syntax + make sure To follow them. #CURLOPT_WRITEFUNCTION= #CURLOPTTYPE_FUNCTIONPOINT + 11 ; Function that will be called To Read the Input (instead of fread). The parameters will use fread() syntax + make sure To follow them. #CURLOPT_READFUNCTION= #CURLOPTTYPE_FUNCTIONPOINT + 12 ; Time-out the Read operation after this amount of seconds #CURLOPT_TIMEOUT= #CURLOPTTYPE_LONG + 13 ; If the CURLOPT_INFILE is used + this can be used To inform libcurl_copy about how large the file being sent really is. That allows better error ; checking And better verifies that the upload was succcessful. -1 means unknown size. ; For large file support + there is also a _LARGE version of the key which takes an off_t type + allowing platforms With larger off_t sizes To handle larger files. See below For INFILESIZE_LARGE. #CURLOPT_INFILESIZE= #CURLOPTTYPE_LONG + 14 ; POST input fields. #CURLOPT_POSTFIELDS= #CURLOPTTYPE_OBJECTPOINT + 15 ; Set the referer page (needed by some CGIs) #CURLOPT_REFERER= #CURLOPTTYPE_OBJECTPOINT + 16 ; Set the FTP PORT string (Interface name + named Or numerical IP address) ; Use i.e '-' To use Default address. #CURLOPT_FTPPORT= #CURLOPTTYPE_OBJECTPOINT + 17 ; Set the User-Agent string (examined by some CGIs) #CURLOPT_USERAGENT= #CURLOPTTYPE_OBJECTPOINT + 18 ; If the download receives less than "low speed limit" bytes/second during "low speed time" seconds + the operations is aborted. ; You could i.e If you have a pretty high speed connection + abort If it is less than 2000 bytes/sec during 20 seconds. ; Set the "low speed limit" #CURLOPT_LOW_SPEED_LIMIT= #CURLOPTTYPE_LONG + 19 ; Set the "low speed time" #CURLOPT_LOW_SPEED_TIME= #CURLOPTTYPE_LONG + 20 ; Set the continuation offset. ; Note there is also a _LARGE version of this key which uses off_t types + allowing For large file offsets on platforms which use larger-than-32-bit off_t's. Look below for RESUME_FROM_LARGE. #CURLOPT_RESUME_FROM= #CURLOPTTYPE_LONG + 21 ; Set cookie in request: #CURLOPT_COOKIE= #CURLOPTTYPE_OBJECTPOINT + 22 ; This points To a linked list of headers + struct curl_slist kind #CURLOPT_HTTPHEADER= #CURLOPTTYPE_OBJECTPOINT + 23 ; This points To a linked list of post entries + struct HttpPost #CURLOPT_HTTPPOST= #CURLOPTTYPE_OBJECTPOINT + 24 ; name of the file keeping your private SSL-certificate #CURLOPT_SSLCERT= #CURLOPTTYPE_OBJECTPOINT + 25 ; password For the SSL Or SSH private key #CURLOPT_KEYPASSWD= #CURLOPTTYPE_OBJECTPOINT + 26 ; send TYPE parameter? #CURLOPT_CRLF= #CURLOPTTYPE_LONG + 27 ; send linked-list of QUOTE commands #CURLOPT_QUOTE= #CURLOPTTYPE_OBJECTPOINT + 28 ; send FILE;Or void;To store headers To + If you use a callback it ; is simply passed To the callback unmodified #CURLOPT_WRITEHEADER= #CURLOPTTYPE_OBJECTPOINT + 29 ; point To a file To Read the initial cookies from + also enables ; "cookie awareness" #CURLOPT_COOKIEFILE= #CURLOPTTYPE_OBJECTPOINT + 31 ; What version To specifly try To use. ; See CURL_SSLVERSION defines below. #CURLOPT_SSLVERSION= #CURLOPTTYPE_LONG + 32 ; What kind of HTTP time condition To use + see defines #CURLOPT_TIMECONDITION= #CURLOPTTYPE_LONG + 33 ; Time To use With the above condition. Specified in number of seconds ; since 1 Jan 1970 #CURLOPT_TIMEVALUE= #CURLOPTTYPE_LONG + 34 ; Custom request= #CURLOPTTYPE_For customizing the get command like ; HTTP: DELETE + TRACE And others ; FTP: To use a different list command #CURLOPT_CUSTOMREQUEST= #CURLOPTTYPE_OBJECTPOINT + 36 ; HTTP request= #CURLOPTTYPE_For odd commands like DELETE + TRACE And others #CURLOPT_STDERR= #CURLOPTTYPE_OBJECTPOINT + 37 ; send linked-list of post-transfer QUOTE commands #CURLOPT_POSTQUOTE= #CURLOPTTYPE_OBJECTPOINT + 39 ; Pass a pointer To string of the output using full variable-replacement ; As described elsewhere. #CURLOPT_WRITEINFO= #CURLOPTTYPE_OBJECTPOINT + 40 #CURLOPT_VERBOSE= #CURLOPTTYPE_LONG + 41 ; talk a lot #CURLOPT_HEADER= #CURLOPTTYPE_LONG + 42 ; throw the header out too #CURLOPT_NOPROGRESS= #CURLOPTTYPE_LONG + 43 ; shut off the progress meter #CURLOPT_NOBODY= #CURLOPTTYPE_LONG + 44 ; use HEAD To get http document #CURLOPT_FAILONERROR= #CURLOPTTYPE_LONG + 45 ; no output on http error codes >= 300 #CURLOPT_UPLOAD= #CURLOPTTYPE_LONG + 46 ; this is an upload #CURLOPT_POST= #CURLOPTTYPE_LONG + 47 ; HTTP POST method #CURLOPT_DIRLISTONLY= #CURLOPTTYPE_LONG + 48 ; Return bare names when listing directories #CURLOPT_APPEND= #CURLOPTTYPE_LONG + 50 ; Append instead of overwrite on upload! ; Specify whether To Read the user+password from the .netrc Or the URL. ; This must be one of the CURL_NETRC_* enums below. #CURLOPT_NETRC= #CURLOPTTYPE_LONG + 51 #CURLOPT_FOLLOWLOCATION= #CURLOPTTYPE_LONG + 52 ; use Location: Luke! #CURLOPT_TRANSFERTEXT= #CURLOPTTYPE_LONG + 53 ; transfer Data in text/ASCII format #CURLOPT_PUT= #CURLOPTTYPE_LONG + 54 ; HTTP PUT ; Function that will be called instead of the internal progress display ; function. This function should be defined As the curl_progress_callback ; Prototype defines. #CURLOPT_PROGRESSFUNCTION= #CURLOPTTYPE_FUNCTIONPOINT + 56 ; Data passed To the progress callback #CURLOPT_PROGRESSDATA= #CURLOPTTYPE_OBJECTPOINT + 57 ; We want the referer field set automatically when following locations #CURLOPT_AUTOREFERER= #CURLOPTTYPE_LONG + 58 ; Port of the proxy + can be set in the proxy string As well With: ; "[host]:[port]" #CURLOPT_PROXYPORT= #CURLOPTTYPE_LONG + 59 ; size of the POST input Data + If strlen() is not good to use #CURLOPT_POSTFIELDSIZE= #CURLOPTTYPE_LONG + 60 ; tunnel non-http operations through a HTTP proxy #CURLOPT_HTTPPROXYTUNNEL= #CURLOPTTYPE_LONG + 61 ; Set the Interface string To use As outgoing network Interface #CURLOPT_INTERFACE= #CURLOPTTYPE_OBJECTPOINT + 62 ; Set the krb4/5 security level + this also enables krb4/5 awareness. This ; is a string + 'clear' + 'safe' + 'confidential' Or 'private'. If the string ; is set but doesn't match one of these + 'private' will be used. #CURLOPT_KRBLEVEL= #CURLOPTTYPE_OBJECTPOINT + 63 ; Set If we should verify the peer in ssl handshake + set 1 To verify. #CURLOPT_SSL_VERIFYPEER= #CURLOPTTYPE_LONG + 64 ; The CApath Or CAfile used To validate the peer certificate ; this option is used only If SSL_VERIFYPEER is true #CURLOPT_CAINFO= #CURLOPTTYPE_OBJECTPOINT + 65 ; Maximum number of http redirects To follow #CURLOPT_MAXREDIRS= #CURLOPTTYPE_LONG + 68 ; Pass a long set To 1 To get the date of the requested document (If ; possible)! Pass a zero To shut it off. #CURLOPT_FILETIME= #CURLOPTTYPE_LONG + 69 ; This points To a linked list of telnet options #CURLOPT_TELNETOPTIONS= #CURLOPTTYPE_OBJECTPOINT + 70 ; Max amount of cached alive connections #CURLOPT_MAXCONNECTS= #CURLOPTTYPE_LONG + 71 ; What policy To use when closing connections when the cache is filled up #CURLOPT_CLOSEPOLICY= #CURLOPTTYPE_LONG + 72 ; Set To explicitly use a new connection For the upcoming transfer. ; Do not use this unless you're absolutely sure of this + as it makes the ; operation slower And is less friendly For the network. #CURLOPT_FRESH_CONNECT= #CURLOPTTYPE_LONG + 74 ; Set To explicitly forbid the upcoming transfer's connection to be re-used ; when done. Do not use this unless you're absolutely sure of this + as it ; makes the operation slower And is less friendly For the network. #CURLOPT_FORBID_REUSE= #CURLOPTTYPE_LONG + 75 ; Set To a file name that contains random Data For libcurl_copy To use To ; seed the random engine when doing SSL connects. #CURLOPT_RANDOM_FILE= #CURLOPTTYPE_OBJECTPOINT + 76 ; Set To the Entropy Gathering Daemon socket pathname #CURLOPT_EGDSOCKET= #CURLOPTTYPE_OBJECTPOINT + 77 ; Time-out connect operations after this amount of seconds + If connects ; are OK within this time + then fine... This only aborts the connect ; phase. [Only works on unix-style/SIGALRM operating systems] #CURLOPT_CONNECTTIMEOUT= #CURLOPTTYPE_LONG + 78 ; Function that will be called To store headers (instead of fwrite). The ; parameters will use fwrite() syntax + make sure To follow them. #CURLOPT_HEADERFUNCTION= #CURLOPTTYPE_FUNCTIONPOINT + 79 ; Set this To force the HTTP request To get back To GET. Only really usable ; If POST + PUT Or a custom request have been used first. #CURLOPT_HTTPGET= #CURLOPTTYPE_LONG + 80 ; Set If we should verify the Common name from the peer certificate in ssl ; handshake + set 1 To check existence + 2 To ensure that it matches the ; provided hostname. #CURLOPT_SSL_VERIFYHOST= #CURLOPTTYPE_LONG + 81 ; Specify which file name To write all known cookies in after completed ; operation. Set file name To "-" (dash) To make it go To stdout. #CURLOPT_COOKIEJAR= #CURLOPTTYPE_OBJECTPOINT + 82 ; Specify which SSL ciphers To use #CURLOPT_SSL_CIPHER_LIST= #CURLOPTTYPE_OBJECTPOINT + 83 ; Specify which HTTP version To use! This must be set To one of the ; CURL_HTTP_VERSION* enums set below. #CURLOPT_HTTP_VERSION= #CURLOPTTYPE_LONG + 84 ; Specificly switch on Or off the FTP engine's use of the EPSV command. By ; Default + that one will always be attempted before the more traditional ; PASV command. #CURLOPT_FTP_USE_EPSV= #CURLOPTTYPE_LONG + 85 ; type of the file keeping your SSL-certificate ("DER" + "PEM" + "ENG") #CURLOPT_SSLCERTTYPE= #CURLOPTTYPE_OBJECTPOINT + 86 ; name of the file keeping your private SSL-key #CURLOPT_SSLKEY= #CURLOPTTYPE_OBJECTPOINT + 87 ; type of the file keeping your private SSL-key ("DER" + "PEM" + "ENG") #CURLOPT_SSLKEYTYPE= #CURLOPTTYPE_OBJECTPOINT + 88 ; crypto engine For the SSL-sub system #CURLOPT_SSLENGINE= #CURLOPTTYPE_OBJECTPOINT + 89 ; set the crypto engine For the SSL-sub system As Default ; the param has no meaning... #CURLOPT_SSLENGINE_DEFAULT= #CURLOPTTYPE_LONG + 90 ; Non-zero value means To use the Global dns cache #CURLOPT_DNS_USE_GLOBAL_CACHE= #CURLOPTTYPE_LONG + 91 ; To become OBSOLETE soon ; DNS cache timeout #CURLOPT_DNS_CACHE_TIMEOUT= #CURLOPTTYPE_LONG + 92 ; send linked-list of pre-transfer QUOTE commands (Wesley Laxton) #CURLOPT_PREQUOTE= #CURLOPTTYPE_OBJECTPOINT + 93 ; set the Debug function #CURLOPT_DEBUGFUNCTION= #CURLOPTTYPE_FUNCTIONPOINT + 94 ; set the Data For the Debug function #CURLOPT_DEBUGDATA= #CURLOPTTYPE_OBJECTPOINT + 95 ; mark this As start of a cookie session #CURLOPT_COOKIESESSION= #CURLOPTTYPE_LONG + 96 ; The CApath directory used To validate the peer certificate ; this option is used only If SSL_VERIFYPEER is true #CURLOPT_CAPATH= #CURLOPTTYPE_OBJECTPOINT + 97 ; Instruct libcurl_copy To use a smaller receive buffer #CURLOPT_BUFFERSIZE= #CURLOPTTYPE_LONG + 98 ; Instruct libcurl_copy To not use any signal/alarm handlers + even when using ; timeouts. This option is useful For multi-threaded applications. ; See libcurl_copy-the-guide For more background information. #CURLOPT_NOSIGNAL= #CURLOPTTYPE_LONG + 99 ; Provide a CURLShare For mutexing non-ts Data #CURLOPT_SHARE= #CURLOPTTYPE_OBJECTPOINT + 100 ; indicates type of proxy. accepted values are CURLPROXY_HTTP (Default ; CURLPROXY_SOCKS4 And CURLPROXY_SOCKS5. #CURLOPT_PROXYTYPE= #CURLOPTTYPE_LONG + 101 ; Set the Accept-Encoding string. Use this To tell a server you would like ; the response To be compressed. #CURLOPT_ENCODING= #CURLOPTTYPE_OBJECTPOINT + 102 ; Set pointer To private Data #CURLOPT_PRIVATE= #CURLOPTTYPE_OBJECTPOINT + 103 ; Set aliases For HTTP 200 in the HTTP Response header #CURLOPT_HTTP200ALIASES= #CURLOPTTYPE_OBJECTPOINT + 104 ; Continue To send authentication (user+password) when following locations, ; even when hostname changed. This can potentionally send off the name ; And password To whatever host the server decides. #CURLOPT_UNRESTRICTED_AUTH= #CURLOPTTYPE_LONG + 105 ; Specificly switch on Or off the FTP engine's use of the EPRT command ( it ; also disables the LPRT attempt). By Default + those ones will always be ; attempted before the good old traditional PORT command. #CURLOPT_FTP_USE_EPRT= #CURLOPTTYPE_LONG + 106 ; Set this To a bitmask value To enable the particular authentications ; methods you like. Use this in combination With CURLOPT_USERPWD. ; Note that setting multiple bits may cause extra network round-trips. #CURLOPT_HTTPAUTH= #CURLOPTTYPE_LONG + 107 ; Set the ssl context callback function + currently only For OpenSSL ssl_ctx ; in second argument. The function must be matching the ; curl_ssl_ctx_callback proto. #CURLOPT_SSL_CTX_FUNCTION= #CURLOPTTYPE_FUNCTIONPOINT + 108 ; Set the userdata For the ssl context callback function's third ; argument #CURLOPT_SSL_CTX_DATA= #CURLOPTTYPE_OBJECTPOINT + 109 ; FTP Option that causes missing dirs To be created on the remote server #CURLOPT_FTP_CREATE_MISSING_DIRS= #CURLOPTTYPE_LONG + 110 ; Set this To a bitmask value To enable the particular authentications ; methods you like. Use this in combination With CURLOPT_PROXYUSERPWD. ; Note that setting multiple bits may cause extra network round-trips. #CURLOPT_PROXYAUTH= #CURLOPTTYPE_LONG + 111 ; FTP option that changes the timeout + in seconds + associated With ; getting a response. This is different from transfer timeout time And ; essentially places a demand on the FTP server To acknowledge commands ; in a timely manner. #CURLOPT_FTP_RESPONSE_TIMEOUT= #CURLOPTTYPE_LONG + 112 ; Set this option To one of the CURL_IPRESOLVE_* defines (see below) To ; tell libcurl_copy To resolve names To those IP versions only. This only has ; affect on systems With support For more than one + i.e IPv4 _and_ IPv6. #CURLOPT_IPRESOLVE= #CURLOPTTYPE_LONG + 113 ; Set this option To limit the size of a file that will be downloaded from ; an HTTP Or FTP server. ; Note there is also _LARGE version which adds large file support For ; platforms which have larger off_t sizes. See MAXFILESIZE_LARGE below. #CURLOPT_MAXFILESIZE= #CURLOPTTYPE_LONG + 114 ; See the comment For INFILESIZE above + but in short + specifies ; the size of the file being uploaded. -1 means unknown. #CURLOPT_INFILESIZE_LARGE= #CURLOPTTYPE_OFF_T + 115 ; Sets the continuation offset. There is also a LONG version of this; ; look above For RESUME_FROM. #CURLOPT_RESUME_FROM_LARGE= #CURLOPTTYPE_OFF_T + 116 ; Sets the maximum size of Data that will be downloaded from ; an HTTP Or FTP server. See MAXFILESIZE above For the LONG version. #CURLOPT_MAXFILESIZE_LARGE= #CURLOPTTYPE_OFF_T + 117 ; Set this option To the file name of your .netrc file you want libcurl_copy ; To parse (using the CURLOPT_NETRC option). If not set= #CURLOPTTYPE_libcurl_copy will do ; a poor attempt To find the user's home directory and check for a .netrc ; file in there. #CURLOPT_NETRC_FILE= #CURLOPTTYPE_OBJECTPOINT + 118 ; Enable SSL/TLS For FTP + pick one of: ; CURLFTPSSL_TRY - try using SSL + proceed anyway otherwise ; CURLFTPSSL_CONTROL - SSL For the control connection Or fail ; CURLFTPSSL_ALL - SSL For all communication Or fail #CURLOPT_USE_SSL= #CURLOPTTYPE_LONG + 119 ; The _LARGE version of the standard POSTFIELDSIZE option #CURLOPT_POSTFIELDSIZE_LARGE= #CURLOPTTYPE_OFF_T + 120 ; Enable/disable the TCP Nagle algorithm #CURLOPT_TCP_NODELAY= #CURLOPTTYPE_LONG + 121 ; 122 OBSOLETE + used in 7.12.3. Gone in 7.13.0 ; 123 OBSOLETE. Gone in 7.16.0 ; 124 OBSOLETE + used in 7.12.3. Gone in 7.13.0 ; 125 OBSOLETE + used in 7.12.3. Gone in 7.13.0 ; 126 OBSOLETE + used in 7.12.3. Gone in 7.13.0 ; 127 OBSOLETE. Gone in 7.16.0 ; 128 OBSOLETE. Gone in 7.16.0 ; When FTP over SSL/TLS is selected (With CURLOPT_USE_SSL this option ; can be used To change libcurl_copy's default action which is to first try ; "AUTH SSL" And then "AUTH TLS" in this order + And proceed when a OK ; response has been received. ; Available parameters are: ; CURLFTPAUTH_DEFAULT - let libcurl_copy decide ; CURLFTPAUTH_SSL - try "AUTH SSL" first + then TLS ; CURLFTPAUTH_TLS - try "AUTH TLS" first + then SSL #CURLOPT_FTPSSLAUTH= #CURLOPTTYPE_LONG + 129 #CURLOPT_IOCTLFUNCTION= #CURLOPTTYPE_FUNCTIONPOINT + 130 #CURLOPT_IOCTLDATA= #CURLOPTTYPE_OBJECTPOINT + 131 ; 132 OBSOLETE. Gone in 7.16.0 ; 133 OBSOLETE. Gone in 7.16.0 ; zero terminated string For pass on To the FTP server when asked For ; "account" info #CURLOPT_FTP_ACCOUNT= #CURLOPTTYPE_OBJECTPOINT + 134 ; feed cookies into cookie engine #CURLOPT_COOKIELIST= #CURLOPTTYPE_OBJECTPOINT + 135 ; ignore Content-Length #CURLOPT_IGNORE_CONTENT_LENGTH= #CURLOPTTYPE_LONG + 136 ; Set To non-zero To skip the IP address received in a 227 PASV FTP server ; response. Typically used For FTP-SSL purposes but is not restricted To ; that. libcurl_copy will then instead use the same IP address it used For the ; control connection. #CURLOPT_FTP_SKIP_PASV_IP= #CURLOPTTYPE_LONG + 137 ; Select "file method" To use when doing FTP + see the curl_ftpmethod ; above. #CURLOPT_FTP_FILEMETHOD= #CURLOPTTYPE_LONG + 138 ; Local port number To bind the socket To #CURLOPT_LOCALPORT= #CURLOPTTYPE_LONG + 139 ; Number of ports To try + including the first one set With LOCALPORT. ; Thus + setting it To 1 will make no additional attempts but the first. #CURLOPT_LOCALPORTRANGE= #CURLOPTTYPE_LONG + 140 ; no transfer + set up connection And let application use the socket by ; extracting it With CURLINFO_LASTSOCKET #CURLOPT_CONNECT_ONLY= #CURLOPTTYPE_LONG + 141 ; Function that will be called To convert from the ; network encoding (instead of using the iconv calls in libcurl_copy) #CURLOPT_CONV_FROM_NETWORK_FUNCTION= #CURLOPTTYPE_FUNCTIONPOINT + 142 ; Function that will be called To convert To the ; network encoding (instead of using the iconv calls in libcurl_copy) #CURLOPT_CONV_TO_NETWORK_FUNCTION= #CURLOPTTYPE_FUNCTIONPOINT + 143 ; Function that will be called To convert from UTF8 ; (instead of using the iconv calls in libcurl_copy) ; Note that this is used only For SSL certificate processing #CURLOPT_CONV_FROM_UTF8_FUNCTION= #CURLOPTTYPE_FUNCTIONPOINT + 144 ; If the connection proceeds too quickly then need To slow it down ; limit-rate: maximum number of bytes per second To send Or receive #CURLOPT_MAX_SEND_SPEED_LARGE= #CURLOPTTYPE_OFF_T + 145 #CURLOPT_MAX_RECV_SPEED_LARGE= #CURLOPTTYPE_OFF_T + 146 ; Pointer To command string To send If USER/PASS fails. #CURLOPT_FTP_ALTERNATIVE_TO_USER= #CURLOPTTYPE_OBJECTPOINT + 147 ; callback function For setting socket options #CURLOPT_SOCKOPTFUNCTION= #CURLOPTTYPE_FUNCTIONPOINT + 148 #CURLOPT_SOCKOPTDATA= #CURLOPTTYPE_OBJECTPOINT + 149 ; set To 0 To disable session ID re-use For this transfer + Default is ; enabled (== 1) #CURLOPT_SSL_SESSIONID_CACHE= #CURLOPTTYPE_LONG + 150 ; allowed SSH authentication methods #CURLOPT_SSH_AUTH_TYPES= #CURLOPTTYPE_LONG + 151 ; Used by scp/sftp To do public/private key authentication #CURLOPT_SSH_PUBLIC_KEYFILE= #CURLOPTTYPE_OBJECTPOINT + 152 #CURLOPT_SSH_PRIVATE_KEYFILE= #CURLOPTTYPE_OBJECTPOINT + 153 ; Send CCC (Clear Command Channel) after authentication #CURLOPT_FTP_SSL_CCC= #CURLOPTTYPE_LONG + 154 ; Same As TIMEOUT And CONNECTTIMEOUT + but With ms resolution #CURLOPT_TIMEOUT_MS= #CURLOPTTYPE_LONG + 155 #CURLOPT_CONNECTTIMEOUT_MS= #CURLOPTTYPE_LONG + 156 ; set To zero To disable the libcurl_copy's decoding and thus pass the raw body ; Data To the appliction even when it is encoded/compressed #CURLOPT_HTTP_TRANSFER_DECODING= #CURLOPTTYPE_LONG + 157 #CURLOPT_HTTP_CONTENT_DECODING= #CURLOPTTYPE_LONG + 158 ; Permission used when creating new files And directories on the remote ; server For protocols that support it + SFTP/SCP/FILE #CURLOPT_NEW_FILE_PERMS= #CURLOPTTYPE_LONG + 159 #CURLOPT_NEW_DIRECTORY_PERMS= #CURLOPTTYPE_LONG + 160 #CURLOPT_POSTREDIR = #CURLOPTTYPE_LONG + 161 ; used by scp/sftp to verify the host's public key #CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 = #CURLOPTTYPE_STRINGPOINT + 162 ; Callback function for opening socket (instead of socket(2)). Optionally, ; callback is able change the address or refuse to connect returning ; #CURL_SOCKET_BAD. The callback should have type ; #CURL_opensocket_callback #CURLOPT_OPENSOCKETFUNCTION = #CURLOPTTYPE_FUNCTIONPOINT + 163 #CURLOPT_OPENSOCKETDATA = #CURLOPTTYPE_OBJECTPOINT + 164 ; POST volatile input fields. #CURLOPT_COPYPOSTFIELDS = #CURLOPTTYPE_OBJECTPOINT + 165 ; set transfer mode (;type=) when doing FTP via an HTTP proxy #CURLOPT_PROXY_TRANSFER_MODE = #CURLOPTTYPE_LONG + 166 ; Callback function for seeking in the input stream #CURLOPT_SEEKFUNCTION = #CURLOPTTYPE_FUNCTIONPOINT + 167 #CURLOPT_SEEKDATA = #CURLOPTTYPE_OBJECTPOINT + 168 ; CRL file #CURLOPT_CRLFILE = #CURLOPTTYPE_STRINGPOINT + 169 ; Issuer certificate #CURLOPT_ISSUERCERT = #CURLOPTTYPE_STRINGPOINT + 170 ; (IPv6) Address scope #CURLOPT_ADDRESS_SCOPE = #CURLOPTTYPE_LONG + 171 ; Collect certificate chain info and allow it to get retrievable with #CURLINFO_CERTINFO after the transfer is complete. #CURLOPT_CERTINFO = #CURLOPTTYPE_LONG + 172 ; "name" and "pwd" to use when fetching. #CURLOPT_USERNAME = #CURLOPTTYPE_STRINGPOINT + 173 #CURLOPT_PASSWORD = #CURLOPTTYPE_STRINGPOINT + 174 ; "name" and "pwd" to use with Proxy when fetching. #CURLOPT_PROXYUSERNAME = #CURLOPTTYPE_STRINGPOINT + 175 #CURLOPT_PROXYPASSWORD = #CURLOPTTYPE_STRINGPOINT + 176 ; Comma separated list of hostnames defining no-proxy zones. These should ; match both hostnames directly, and hostnames within a domain. For ; example, local.com will match local.com and www.local.com, but NOT ; notlocal.com or www.notlocal.com. For compatibility with other ; implementations of this, .local.com will be considered to be the same as ; local.com. A single * is the only valid wildcard, and effectively ; disables the use of proxy. #CURLOPT_NOPROXY = #CURLOPTTYPE_STRINGPOINT + 177 ; block size for TFTP transfers #CURLOPT_TFTP_BLKSIZE = #CURLOPTTYPE_LONG + 178 ; Socks Service ; DEPRECATED, do not use! #CURLOPT_SOCKS5_GSSAPI_SERVICE = #CURLOPTTYPE_STRINGPOINT + 179 ; Socks Service #CURLOPT_SOCKS5_GSSAPI_NEC = #CURLOPTTYPE_LONG + 180 ; set the bitmask for the protocols that are allowed to be used for the ; transfer, which thus helps the app which takes URLs from users or other ; external inputs and want to restrict what protocol(s) to deal ; with. Defaults to #CURLPROTO_ALL. #CURLOPT_PROTOCOLS = #CURLOPTTYPE_LONG + 181 ; set the bitmask for the protocols that lib#CURL is allowed to follow to, ; as a subset of the #CURLOPT_PROTOCOLS ones. That means the protocol needs ; to be set in both bitmasks to be allowed to get redirected to. #CURLOPT_REDIR_PROTOCOLS = #CURLOPTTYPE_LONG + 182 ; set the SSH knownhost file name to use #CURLOPT_SSH_KNOWNHOSTS = #CURLOPTTYPE_STRINGPOINT + 183 ; set the SSH host key callback, must point to a #CURL_sshkeycallback function #CURLOPT_SSH_KEYFUNCTION = #CURLOPTTYPE_FUNCTIONPOINT + 184 ; set the SSH host key callback custom pointer #CURLOPT_SSH_KEYDATA = #CURLOPTTYPE_OBJECTPOINT + 185 ; set the SMTP mail originator #CURLOPT_MAIL_FROM = #CURLOPTTYPE_STRINGPOINT + 186 ; set the list of SMTP mail receiver(s) #CURLOPT_MAIL_RCPT = #CURLOPTTYPE_SLISTPOINT + 187 ; FTP: send PRET before PASV #CURLOPT_FTP_USE_PRET = #CURLOPTTYPE_LONG + 188 ; RTSP request method (OPTIONS, SETUP, PLAY, etc...) #CURLOPT_RTSP_REQUEST = #CURLOPTTYPE_LONG + 189 ; The RTSP session identifier #CURLOPT_RTSP_SESSION_ID = #CURLOPTTYPE_STRINGPOINT + 190 ; The RTSP stream URI #CURLOPT_RTSP_STREAM_URI = #CURLOPTTYPE_STRINGPOINT + 191 ; The Transport: header to use in RTSP requests #CURLOPT_RTSP_TRANSPORT = #CURLOPTTYPE_STRINGPOINT + 192 ; Manually initialize the client RTSP CSeq for this handle #CURLOPT_RTSP_CLIENT_CSEQ = #CURLOPTTYPE_LONG + 193 ; Manually initialize the server RTSP CSeq for this handle #CURLOPT_RTSP_SERVER_CSEQ = #CURLOPTTYPE_LONG + 194 ; The stream to pass to INTERLEAVEFUNCTION. #CURLOPT_INTERLEAVEDATA = #CURLOPTTYPE_OBJECTPOINT + 195 ; Let the application define a custom write method for RTP data #CURLOPT_INTERLEAVEFUNCTION = #CURLOPTTYPE_FUNCTIONPOINT + 196 ; Turn on wildcard matching #CURLOPT_WILDCARDMATCH = #CURLOPTTYPE_LONG + 197 ; Directory matching callback called before downloading of an individual file (chunk) started #CURLOPT_CHUNK_BGN_FUNCTION = #CURLOPTTYPE_FUNCTIONPOINT + 198 ; Directory matching callback called after the file (chunk) was downloaded, or skipped #CURLOPT_CHUNK_END_FUNCTION = #CURLOPTTYPE_FUNCTIONPOINT + 199 ; Change match (fnmatch-like) callback for wildcard matching #CURLOPT_FNMATCH_FUNCTION = #CURLOPTTYPE_FUNCTIONPOINT + 200 ; Let the application define custom chunk data pointer #CURLOPT_CHUNK_DATA = #CURLOPTTYPE_OBJECTPOINT + 201 ; FNMATCH_FUNCTION user pointer #CURLOPT_FNMATCH_DATA = #CURLOPTTYPE_OBJECTPOINT + 202 ; send linked-list of name:port:address sets #CURLOPT_RESOLVE = #CURLOPTTYPE_SLISTPOINT + 203 ; Set a username for authenticated TLS #CURLOPT_TLSAUTH_USERNAME = #CURLOPTTYPE_STRINGPOINT + 204 ; Set a password for authenticated TLS #CURLOPT_TLSAUTH_PASSWORD = #CURLOPTTYPE_STRINGPOINT + 205 ; Set authentication type for authenticated TLS #CURLOPT_TLSAUTH_TYPE = #CURLOPTTYPE_STRINGPOINT + 206 ; Set to 1 to enable the "TE:" header in HTTP requests to ask for ; compressed transfer-encoded responses. Set to 0 to disable the use of TE: ; in outgoing requests. The current default is 0, but it might change in a ; future lib#CURL release. ; lib#CURL will ask for the compressed methods it knows of, and if that ; isn't any, it will not ask for transfer-encoding at all even if this ; option is set to 1. #CURLOPT_TRANSFER_ENCODING = #CURLOPTTYPE_LONG + 207 ; Callback function for closing socket (instead of close(2)). The callback should have type #CURL_closesocket_callback #CURLOPT_CLOSESOCKETFUNCTION = #CURLOPTTYPE_FUNCTIONPOINT + 208 #CURLOPT_CLOSESOCKETDATA = #CURLOPTTYPE_OBJECTPOINT + 209 ; allow GSSAPI credential delegation #CURLOPT_GSSAPI_DELEGATION = #CURLOPTTYPE_LONG + 210 ; Set the name servers to use for DNS resolution #CURLOPT_DNS_SERVERS = #CURLOPTTYPE_STRINGPOINT + 211 ; Time-out accept operations (currently for FTP only) after this amount of milliseconds. #CURLOPT_ACCEPTTIMEOUT_MS = #CURLOPTTYPE_LONG + 212 ; Set TCP keepalive #CURLOPT_TCP_KEEPALIVE = #CURLOPTTYPE_LONG + 213 ; non-universal keepalive knobs (Linux, AIX, HP-UX, more) #CURLOPT_TCP_KEEPIDLE = #CURLOPTTYPE_LONG + 214 #CURLOPT_TCP_KEEPINTVL = #CURLOPTTYPE_LONG + 215 ; Enable/disable specific SSL features with a bitmask, see #CURLSSLOPT_* #CURLOPT_SSL_OPTIONS = #CURLOPTTYPE_LONG + 216 ; Set the SMTP auth originator #CURLOPT_MAIL_AUTH = #CURLOPTTYPE_STRINGPOINT + 217 ; Enable/disable SASL initial response #CURLOPT_SASL_IR = #CURLOPTTYPE_LONG + 218 ; Function that will be called instead of the internal progress display ; * function. This function should be defined as the #CURL_xferinfo_callback ; * prototype defines. (Deprecates #CURLOPT_PROGRESSFUNCTION) #CURLOPT_XFERINFOFUNCTION = #CURLOPTTYPE_FUNCTIONPOINT + 219 ; The XOAUTH2 bearer token #CURLOPT_XOAUTH2_BEARER = #CURLOPTTYPE_STRINGPOINT + 220 ; Set the interface string to use as outgoing network ; * interface for DNS requests. ; * Only supported by the c-ares DNS backend #CURLOPT_DNS_INTERFACE = #CURLOPTTYPE_STRINGPOINT + 221 ; Set the local IPv4 address to use for outgoing DNS requests. ; * Only supported by the c-ares DNS backend #CURLOPT_DNS_LOCAL_IP4 = #CURLOPTTYPE_STRINGPOINT + 222 ; Set the local IPv6 address to use for outgoing DNS requests. ; * Only supported by the c-ares DNS backend #CURLOPT_DNS_LOCAL_IP6 = #CURLOPTTYPE_STRINGPOINT + 223 ; Set authentication options directly #CURLOPT_LOGIN_OPTIONS = #CURLOPTTYPE_STRINGPOINT + 224 ; Enable/disable TLS NPN extension (http2 over ssl might fail without) #CURLOPT_SSL_ENABLE_NPN = #CURLOPTTYPE_LONG + 225 ; Enable/disable TLS ALPN extension (http2 over ssl might fail without) #CURLOPT_SSL_ENABLE_ALPN = #CURLOPTTYPE_LONG + 226 ; Time to wait for a response to a HTTP request containing an ; * Expect: 100-continue header before sending the data anyway. #CURLOPT_EXPECT_100_TIMEOUT_MS = #CURLOPTTYPE_LONG + 227 ; This points to a linked list of headers used for proxy requests only, struct #CURL_slist kind #CURLOPT_PROXYHEADER = #CURLOPTTYPE_SLISTPOINT + 228 ; Pass in a bitmask of "header options" #CURLOPT_HEADEROPT = #CURLOPTTYPE_LONG + 229 ; The public key in DER form used to validate the peer public key this option is used only if SSL_VERIFYPEER is true #CURLOPT_PINNEDPUBLICKEY = #CURLOPTTYPE_STRINGPOINT + 230 ; Path to Unix domain socket #CURLOPT_UNIX_SOCKET_PATH = #CURLOPTTYPE_STRINGPOINT + 231 ; Set if we should verify the certificate status. #CURLOPT_SSL_VERIFYSTATUS = #CURLOPTTYPE_LONG + 232 ; Set if we should enable TLS false start. #CURLOPT_SSL_FALSESTART = #CURLOPTTYPE_LONG + 233 ; Do not squash dot-dot sequences #CURLOPT_PATH_AS_IS = #CURLOPTTYPE_LONG + 234 ; Proxy Service Name #CURLOPT_PROXY_SERVICE_NAME = #CURLOPTTYPE_STRINGPOINT + 235 ; Service Name #CURLOPT_SERVICE_NAME = #CURLOPTTYPE_STRINGPOINT + 236 ; Wait/don't wait for pipe/mutex to clarify #CURLOPT_PIPEWAIT = #CURLOPTTYPE_LONG + 237 ; Set the protocol used when #CURL is given a URL without a protocol #CURLOPT_DEFAULT_PROTOCOL = #CURLOPTTYPE_STRINGPOINT + 238 ; Set stream weight, 1 - 256 (default is 16) #CURLOPT_STREAM_WEIGHT = #CURLOPTTYPE_LONG + 239 ; Set stream dependency on another ##CURL handle #CURLOPT_STREAM_DEPENDS = #CURLOPTTYPE_OBJECTPOINT + 240 ; Set E-xclusive stream dependency on another #CURL handle #CURLOPT_STREAM_DEPENDS_E = #CURLOPTTYPE_OBJECTPOINT + 241 ; Do not send any tftp option requests to the server #CURLOPT_TFTP_NO_OPTIONS = #CURLOPTTYPE_LONG + 242 ; Linked-list of host:port:connect-to-host:connect-to-port, overrides the URL's host:port (only for the network layer) #CURLOPT_CONNECT_TO = #CURLOPTTYPE_SLISTPOINT + 243 ; Set TCP Fast Open #CURLOPT_TCP_FASTOPEN = #CURLOPTTYPE_LONG + 244 ; Continue to send data if the server responds early with an HTTP status code >= 300 #CURLOPT_KEEP_SENDING_ON_ERROR = #CURLOPTTYPE_LONG + 245 ; The CApath or CAfile used to validate the proxy certificate this option is used only if PROXY_SSL_VERIFYPEER is true #CURLOPT_PROXY_CAINFO = #CURLOPTTYPE_STRINGPOINT + 246 ; The CApath directory used to validate the proxy certificate this option is used only if PROXY_SSL_VERIFYPEER is true #CURLOPT_PROXY_CAPATH = #CURLOPTTYPE_STRINGPOINT + 247 ; Set if we should verify the proxy in ssl handshake, set 1 to verify. #CURLOPT_PROXY_SSL_VERIFYPEER = #CURLOPTTYPE_LONG + 248 ; Set if we should verify the Common name from the proxy certificate in ssl ; * handshake, set 1 to check existence + 2 to ensure that it matches ; * the provided hostname. #CURLOPT_PROXY_SSL_VERIFYHOST = #CURLOPTTYPE_LONG + 249 ; What version to specifically try to use for proxy. ; See #CURL_SSLVERSION defines below. #CURLOPT_PROXY_SSLVERSION = #CURLOPTTYPE_LONG + 250 ; Set a username for authenticated TLS for proxy #CURLOPT_PROXY_TLSAUTH_USERNAME = #CURLOPTTYPE_STRINGPOINT + 251 ; Set a password for authenticated TLS for proxy #CURLOPT_PROXY_TLSAUTH_PASSWORD = #CURLOPTTYPE_STRINGPOINT + 252 ; Set authentication type for authenticated TLS for proxy #CURLOPT_PROXY_TLSAUTH_TYPE = #CURLOPTTYPE_STRINGPOINT + 253 ; name of the file keeping your private SSL-certificate for proxy #CURLOPT_PROXY_SSLCERT = #CURLOPTTYPE_STRINGPOINT + 254 ; type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") for proxy #CURLOPT_PROXY_SSLCERTTYPE = #CURLOPTTYPE_STRINGPOINT + 255 ; name of the file keeping your private SSL-key for proxy #CURLOPT_PROXY_SSLKEY = #CURLOPTTYPE_STRINGPOINT + 256 ; type of the file keeping your private SSL-key ("DER", "PEM", "ENG") for proxy #CURLOPT_PROXY_SSLKEYTYPE = #CURLOPTTYPE_STRINGPOINT + 257 ; password for the SSL private key for proxy #CURLOPT_PROXY_KEYPASSWD = #CURLOPTTYPE_STRINGPOINT + 258 ; Specify which SSL ciphers to use for proxy #CURLOPT_PROXY_SSL_CIPHER_LIST = #CURLOPTTYPE_STRINGPOINT + 259 ; CRL file for proxy #CURLOPT_PROXY_CRLFILE = #CURLOPTTYPE_STRINGPOINT + 260 ; Enable/disable specific SSL features with a bitmask for proxy, see #CURLSSLOPT_* #CURLOPT_PROXY_SSL_OPTIONS = #CURLOPTTYPE_LONG + 261 ; Name of pre proxy to use. #CURLOPT_PRE_PROXY = #CURLOPTTYPE_STRINGPOINT + 262 ; The public key in DER form used to validate the proxy public key this option is used only if PROXY_SSL_VERIFYPEER is true #CURLOPT_PROXY_PINNEDPUBLICKEY = #CURLOPTTYPE_STRINGPOINT + 263 ; Path to an abstract Unix domain socket #CURLOPT_ABSTRACT_UNIX_SOCKET = #CURLOPTTYPE_STRINGPOINT + 264 ; Suppress proxy CONNECT response headers from user callbacks #CURLOPT_SUPPRESS_CONNECT_HEADERS = #CURLOPTTYPE_LONG + 265 ; The request target, instead of extracted from the URL #CURLOPT_REQUEST_TARGET = #CURLOPTTYPE_STRINGPOINT + 266 ; bitmask of allowed auth methods for connections to SOCKS5 proxies #CURLOPT_SOCKS5_AUTH = #CURLOPTTYPE_LONG + 267 ; Enable/disable SSH compression #CURLOPT_SSH_COMPRESSION = #CURLOPTTYPE_LONG + 268 ; Post MIME data. #CURLOPT_MIMEPOST = #CURLOPTTYPE_OBJECTPOINT + 269 ; Time to use with the #CURLOPT_TIMECONDITION. Specified in number of seconds since 1 Jan 1970. #CURLOPT_TIMEVALUE_LARGE = #CURLOPTTYPE_OFF_T + 270 ; Head start in milliseconds to give happy eyeballs. #CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS = #CURLOPTTYPE_LONG + 271 ; Function that will be called before a resolver request is made #CURLOPT_RESOLVER_START_FUNCTION = #CURLOPTTYPE_FUNCTIONPOINT + 272 ; User data to pass to the resolver start callback. #CURLOPT_RESOLVER_START_DATA = #CURLOPTTYPE_OBJECTPOINT + 273 ; send HAProxy PROXY protocol header? #CURLOPT_HAPROXYPROTOCOL = #CURLOPTTYPE_LONG + 274 ; shuffle addresses before use when DNS returns multiple #CURLOPT_DNS_SHUFFLE_ADDRESSES = #CURLOPTTYPE_LONG + 275 ; Specify which TLS 1.3 ciphers suites to use #CURLOPT_TLS13_CIPHERS = #CURLOPTTYPE_STRINGPOINT + 276 #CURLOPT_PROXY_TLS13_CIPHERS = #CURLOPTTYPE_STRINGPOINT + 277 ; Disallow specifying username/login in URL. #CURLOPT_DISALLOW_USERNAME_IN_URL = #CURLOPTTYPE_LONG + 278 ; DNS-over-HTTPS URL #CURLOPT_DOH_URL = #CURLOPTTYPE_STRINGPOINT + 279 ; Preferred buffer size to use for uploads #CURLOPT_UPLOAD_BUFFERSIZE = #CURLOPTTYPE_LONG + 280 ; Time in ms between connection upkeep calls for long-lived connections. #CURLOPT_UPKEEP_INTERVAL_MS = #CURLOPTTYPE_LONG + 281 ; Specify URL using #CURL URL API. #CURLOPT_CURLU = #CURLOPTTYPE_OBJECTPOINT + 282 ; add trailing data just after no more data is available #CURLOPT_TRAILERFUNCTION = #CURLOPTTYPE_FUNCTIONPOINT + 283 ; pointer to be passed to HTTP_TRAILER_FUNCTION #CURLOPT_TRAILERDATA = #CURLOPTTYPE_OBJECTPOINT + 284 ; set this to 1L to allow HTTP/0.9 responses or 0L to disallow #CURLOPT_HTTP09_ALLOWED = #CURLOPTTYPE_LONG + 285 ; alt-svc control bitmask #CURLOPT_ALTSVC_CTRL = #CURLOPTTYPE_LONG + 286 ; alt-svc cache file name to possibly read from/write to #CURLOPT_ALTSVC = #CURLOPTTYPE_STRINGPOINT + 287 ; maximum age of a connection to consider it for reuse (in seconds) #CURLOPT_MAXAGE_CONN = #CURLOPTTYPE_LONG + 288 ; SASL authorisation identity #CURLOPT_SASL_AUTHZID = #CURLOPTTYPE_STRINGPOINT + 289 ; allow RCPT TO command to fail for some recipients #CURLOPT_MAIL_RCPT_ALLLOWFAILS = #CURLOPTTYPE_LONG + 290 ; the private SSL-certificate as a "blob" #CURLOPT_SSLCERT_BLOB = #CURLOPTTYPE_BLOB + 291 #CURLOPT_SSLKEY_BLOB = #CURLOPTTYPE_BLOB + 292 #CURLOPT_PROXY_SSLCERT_BLOB = #CURLOPTTYPE_BLOB + 293 #CURLOPT_PROXY_SSLKEY_BLOB = #CURLOPTTYPE_BLOB + 294 #CURLOPT_ISSUERCERT_BLOB = #CURLOPTTYPE_BLOB + 295 ; Issuer certificate for proxy #CURLOPT_PROXY_ISSUERCERT = #CURLOPTTYPE_STRINGPOINT + 296 #CURLOPT_PROXY_ISSUERCERT_BLOB = #CURLOPTTYPE_BLOB + 297 ;CURLOPT_LASTENTRY ; the last unused #CURLOPT_FTPLISTONLY = #CURLOPT_DIRLISTONLY #HTTPPOST_FILENAME = 1<<0 ; specified content is a file name #HTTPPOST_READFILE = 1<<1 ; specified content is a file name #HTTPPOST_PTRNAME = 1<<2 ; name is only stored pointer ; do not free in formfree #HTTPPOST_PTRCONTENTS = 1<<3 ; contents is only stored pointer ; do not free in formfree #HTTPPOST_BUFFER = 1<<4 ; upload file from buffer #HTTPPOST_PTRBUFFER = 1<<5 ; upload file from pointer contents #CURLE_HTTP_NOT_FOUND = #CURLE_HTTP_RETURNED_ERROR #CURLE_HTTP_PORT_FAILED = #CURLE_INTERFACE_FAILED ; #CURLE_FTP_COULDNT_STOR_FILE = #CURLE_UPLOAD_FAILED #CURLE_FTP_PARTIAL_FILE = #CURLE_PARTIAL_FILE #CURLE_FTP_BAD_DOWNLOAD_RESUME = #CURLE_BAD_DOWNLOAD_RESUME #CURLE_ALREADY_COMPLETE = 99999 #CURLAUTH_NONE = 0 ; nothing #CURLAUTH_BASIC = 1<<0 ; Basic (Default) #CURLAUTH_DIGEST = 1<<1 ; Digest #CURLAUTH_GSSNEGOTIATE = 1<<2 ; GSS-Negotiate #CURLAUTH_NTLM = 1<<3 ; NTLM #CURLAUTH_ANY = ~0 ; all types set #CURLAUTH_ANYSAFE = ~#CURLAUTH_BASIC #CURLSSH_AUTH_ANY = ~0 ; all types supported by the server #CURLSSH_AUTH_NONE = 0 ; none allowed, silly but complete #CURLSSH_AUTH_PUBLICKEY = 1<<0 ; public/private key files #CURLSSH_AUTH_PASSWORD = 1<<1 ; password #CURLSSH_AUTH_HOST = 1<<2 ; host key files #CURLSSH_AUTH_KEYBOARD = 1<<3 ; keyboard interactive #CURLSSH_AUTH_DEFAULT = #CURLSSH_AUTH_ANY #CURL_ERROR_SIZE = 256 #CURLFTPSSL_NONE = #CURLUSESSL_NONE #CURLFTPSSL_TRY = #CURLUSESSL_TRY #CURLFTPSSL_CONTROL = #CURLUSESSL_CONTROL #CURLFTPSSL_ALL = #CURLUSESSL_ALL #CURLFTPSSL_LAST = #CURLUSESSL_LAST #CURLOPT_SSLKEYPASSWD = #CURLOPT_KEYPASSWD #CURLOPT_FTPAPPEND = #CURLOPT_APPEND #CURLOPT_FTPLISTONLY = #CURLOPT_DIRLISTONLY #CURLOPT_FTP_SSL = #CURLOPT_USE_SSL #CURLOPT_SSLCERTPASSWD = #CURLOPT_KEYPASSWD #CURLOPT_KRB4LEVEL = #CURLOPT_KRBLEVEL ; Below here follows defines for the CURLOPT_IPRESOLVE option. If a host ; name resolves addresses using more than one IP protocol version, this ; option might be handy to force libcurl_copy to use a specific IP version. #CURL_IPRESOLVE_WHATEVER = 0 ; Default, resolves addresses To all IP versions that your system allows #CURL_IPRESOLVE_V4 = 1 ; resolve To ipv4 addresses #CURL_IPRESOLVE_V6 = 2 ; resolve To ipv6 addresses ; three convenient "aliases" that follow the name scheme better #CURLOPT_WRITEDATA = #CURLOPT_FILE #CURLOPT_READDATA = #CURLOPT_INFILE #CURLOPT_HEADERDATA = #CURLOPT_WRITEHEADER ; CURLINFO_RESPONSE_CODE is the new name For the option previously known As ; CURLINFO_HTTP_CODE #CURLINFO_HTTP_CODE = #CURLINFO_RESPONSE_CODE #CURL_GLOBAL_SSL = 1<<0 #CURL_GLOBAL_WIN32 = 1<<1 #CURL_GLOBAL_ALL = #CURL_GLOBAL_SSL|#CURL_GLOBAL_WIN32 #CURL_GLOBAL_NOTHING= 0 #CURL_GLOBAL_DEFAULT= #CURL_GLOBAL_ALL ;The 'CURLVERSION_NOW' is the symbolic name meant To be used by ; basicly all programs ever, that want To get version information. It is ; meant To be a built-in version number For what kind of struct the caller ; expects. If the struct ever changes, we rethe NOW To another enum ; from above. #CURLVERSION_NOW = #CURLVERSION_FOURTH #CURL_VERSION_IPV6 = 1<<0 ;IPv6-enabled #CURL_VERSION_KERBEROS4 = 1<<1 ;kerberos auth is supported #CURL_VERSION_SSL = 1<<2 ;SSL options are present #CURL_VERSION_LIBZ = 1<<3 ;libz features are present #CURL_VERSION_NTLM = 1<<4 ;NTLM auth is supported #CURL_VERSION_GSSNEGOTIATE = 1<<5; Negotiate auth support #CURL_VERSION_DEBUG = 1<<6 ;built With Debug capabilities #CURL_VERSION_ASYNCHDNS = 1<<7 ;asynchronous dns resolves #CURL_VERSION_SPNEGO = 1<<8 ;SPNEGO auth #CURL_VERSION_LARGEFILE = 1<<9 ;supports files bigger than 2GB #CURL_VERSION_IDN = 1<<10 ;International Domain Names support #CURL_VERSION_SSPI = 1<<11 ;SSPI is supported #CURL_VERSION_CONV = 1<<12 ;character conversions are supported Structure Curl_HTTPPost *Next_.Curl_HTTPPost ; Next entry in the list *name.String ; Ptr to allocated name namelength.l ; Length of name length *contents.String ; Ptr to allocated data contents contentslength.l ; Length of contents field *buffer.String ; Ptr to allocated buffer contents bufferlength.l ; Length of buffer field *contenttype.String ; Content-Type *contentheader ; List of extra headers for this form *more.Curl_HTTPPost ; If one field name has more than one ; file, this link should link To following files flags.l ; constante #HTTPPOST *showfilename ; The file name to show. If not set, the ; actual file name will be used (If this ; is a file part) EndStructure ; Structure To be used As parameter For CURLFORM_ARRAY Structure Curl_Forms option.l *value.String EndStructure ; linked-list Structure For the CURLOPT_QUOTE option (And other) Structure Curl_Slist *Data.String *Next_.curl_slist EndStructure Structure curl_version_info_data age.l ; age of the returned struct *version.String ; libcurl_copy_VERSION version_num.l ; libcurl_copy_VERSION_NUM *host.String ; OS/host/cpu/machine when configured features.l ; bitmask, see defines below *ssl_version.String ; human readable string ssl_version_num.l ; not used anymore, always 0 *libz_version.String; human readable string ; protocols is terminated by an entry With a NULL protoname *protocols.String ; The fields below this were added in CURLVERSION_SECOND *ares.String ares_num.l ; This field was added in CURLVERSION_THIRD *libidn.String; ; These field were added in CURLVERSION_FOURTH ; Same As '_libiconv_version' If built With HAVE_ICONV iconv_ver_num.l *libssh_version.String ; human readable string EndStructure ; ********************************************************************************** ; procedure to send different types of data to curl using the set option function ; ********************************************************************************** Procedure.i PBCurlEasySetOption(curlHandle.i, curlOption.i, curlParameterType.i, *curlParameter) Protected result.i Protected curlLong.l Protected curlFloat.f Protected curlDouble.d Protected curlResult.i Protected curlInteger.i ; create static pointers for use with and string data, we do this so we don't continually allocate memory Static *curlUTF8String Static *curlAsciiString If *curlUTF8String = 0 *curlUTF8String = AllocateMemory(256) EndIf If *curlAsciiString = 0 *curlAsciiString = AllocateMemory(256) EndIf Select curlParameterType ; send quad integer data to the set option function Case #CURL_TYPE_INTEGER curlInteger = PeekI(*curlParameter) curlResult = curl_easy_setopt(curlHandle, curlOption, curlInteger) ; send long integer data to the set option function Case #CURL_TYPE_LONG curlLong = PeekL(*curlParameter) curlResult = curl_easy_setopt(curlHandle, curlOption, curlLong) ; send float data to the set option function Case #CURL_TYPE_FLOAT curlFloat = PeekF(*curlParameter) curlResult = curl_easy_setopt(curlHandle, curlOption, curlFloat) ; send double data to the set option function Case #CURL_TYPE_DOUBLE curlDouble = PeekD(*curlParameter) curlResult = curl_easy_setopt(curlHandle, curlOption, curlDouble) ; send pointer data to the set option function Case #CURL_TYPE_POINTER curlResult = curl_easy_setopt(curlHandle, curlOption, *curlParameter) ; send NULL data to the set option function Case #CURL_TYPE_NULL curlResult = curl_easy_setopt(curlHandle, curlOption, 0) ; send utf8 data to the set option function Case #CURL_TYPE_UTF8 PokeS(*curlUTF8String, PeekS(*curlParameter), -1, #PB_UTF8) curlResult = curl_easy_setopt(curlHandle, curlOption, *curlUTF8String) ; send ascii data to the set option function Case #CURL_TYPE_ASCII PokeS(*curlaSCIIString, PeekS(*curlParameter), -1, #PB_Ascii) curlResult = curl_easy_setopt(curlHandle, curlOption, *curlAsciiString) ; send unicode data to the set option function Case #CURL_TYPE_UNICODE curlResult = curl_easy_setopt(curlHandle, curlOption, *curlParameter) ; send init error back to calling process Default curlResult = 2 EndSelect ProcedureReturn curlResult EndProcedure ; ********************************************************************************** ; procedure to receive UTF8 data returning from curl commands ; ********************************************************************************** ProcedureC.i PBCurlWriteData(*passedPointer, sizeOfOneByte.i, sizeOfData.i, *notYetUsed) CopyMemory(*passedPointer, *curlMemoryArea + curlTotalReceived, sizeOfData) curlTotalReceived + sizeOfData ProcedureReturn sizeOfData EndProcedure ; ********************************************************************************** ; wrapper procedure to call curl easy perform ; ********************************************************************************** Procedure.i PBCurlEasyPerform(curlHandle.i, *curlURL, *customRequest, *receiveAmount, *localMemArea) Protected result.i Protected receiveAmount.i Protected curlURL.s = PeekS(*curlURL) Protected customRequest.s = PeekS(*customRequest) ; send the url and custom request to curl for processing PBCurlEasySetOption(curlHandle, #CURLOPT_URL, #CURL_TYPE_UTF8, *curlURL) If customRequest > "" PBCurlEasySetOption(curlHandle, #CURLOPT_CUSTOMREQUEST, #CURL_TYPE_UTF8, *customRequest) Else PBCurlEasySetOption(curlHandle, #CURLOPT_CUSTOMREQUEST, #CURL_TYPE_NULL, 0) EndIf ; total received is a global variable, so it must reside after the lock is acquired curlTotalReceived = 0 PokeI(*receiveAmount, curlTotalReceived) result = curl_easy_perform(curlHandle) ; get the amount recieved, and poke that, and the data received into pointers to send back to the calling procedure If result = #CURLE_OK receiveAmount = curlTotalReceived If receiveAmount PokeI(*receiveAmount, receiveAmount) CopyMemory(*curlMemoryArea, *localMemArea, receiveAmount) EndIf EndIf Print("PBCurlEasyPerform() > " + "curlURL = '" + curlURL) If customRequest = "" PrintN("") Else PrintN("', customRequest = '" + customRequest + "'") EndIf If result = #CURLE_OK PrintN("PBCurlEasyPerform() > Response = " + curleMessages(result) + ", receiveAmount = " + Str(receiveAmount)) Else If result > #CURLE_OK And result < #CURLE_LAST_ERROR_ENUMERATED PrintN("PBCurlEasyPerform() > Error = " + curleMessages(result)) Else PrintN("PBCurlEasyPerform() > Error number = " + Str(result)) EndIf If result = #CURLE_QUOTE_ERROR PrintN("PBCurlEasyPerform() > A #CURLE_QUOTE_ERROR may be normal, depending on the Curl command") EndIf EndIf ProcedureReturn result EndProcedure ; ********************************************************************************** ; procedure to extract a number form given text data in memory ; ********************************************************************************** Procedure.i ExtractRequiredNumber(*memoryArea, *numberPrefix, *numberSuffix, startPosition.i, receiveAmount.i) Protected foundPrefix.i Protected begPosition.i Protected endPosition.i Protected foundSuffix.i Protected lengthPrefix.i Protected numberPrefix.s Protected numberSuffix.s Protected messageNumber.s Protected messageNumLen.i Protected processNum.i = 4 Protected netSource.s = "ExtractRequiredNumber() > " numberSuffix = PeekS(*numberSuffix, -1, #PB_UTF8) numberPrefix = PeekS(*numberPrefix, -1, #PB_UTF8) lengthPrefix = Len(numberPrefix) foundPrefix = FindInStringSSE42(*memoryArea, *numberPrefix, startPosition) foundSuffix = FindInStringSSE42(*memoryArea, *numberSuffix, foundPrefix) If foundPrefix > 0 And foundPrefix < foundSuffix And foundSuffix < receiveAmount begPosition = *memoryArea + foundPrefix + lengthPrefix endPosition = *memoryArea + foundSuffix messageNumLen = endPosition - begPosition messageNumber = PeekS(begPosition - 1, messageNumLen, #PB_UTF8) EndIf PrintN(netSource + "numberPrefix = '" + numberPrefix + "'") PrintN(netSource + "lengthPrefix = " + Str(lengthPrefix)) PrintN(netSource + "numberSuffix = '" + numberSuffix + "'") PrintN(netSource + "foundPrefix = " + Str(foundPrefix)) PrintN(netSource + "foundSuffix = " + Str(foundSuffix)) PrintN(netSource + "begPosition = " + Str(begPosition - 1)) PrintN(netSource + "messageNumLen = " + Str(messageNumLen)) PrintN(netSource + "Extracted Num = " + messageNumber) ProcedureReturn Val(messageNumber) EndProcedure ; ********************************************************************************** ; procedure to find a substring in a string ; ********************************************************************************** Procedure.i FindInStringSSE42(baseStringPointer.i, subStringPointer.i, startPos.i) ; !!! NOTE: This procedure cannot be sent through the normal debugger, it will throw a memory error !!! DisableDebugger EnableASM !mov rax,r8 ;need RAX for return-value ProcedureReturn, R8=StartPos !cmp rax,1 !jge @f !mov rax,1 ;or End or Error !@@: !mov r8,rcx ;need RCX for return-value PCMPISTRI, RCX=baseStringPointer !sub r8,1 !add r8,rax ;rax=StartPos !movdqu xmm0,[rdx] ;first max.16 Bytes of Find$, RDX=subStringPointer !xor rcx,rcx !Search: !add rax,rcx !add r8,rcx !pcmpistri xmm0,dqword[r8],00001100b ;Least Significant Index, Positive Polarity (IntRes2=IntRes1), Equal Ordered, Unsigned Bytes (=No Unicode) !jz Base$End ;Zero-Flag is set if found end of Base$ !js Find$End ;Sign-Flag is set if found end of Find$ !jrcxz @f ;jump if RCX is zero !jmp Search !@@: !movdqa xmm1,xmm0 ;save xmm0 !mov r9,r8 !mov r10,rdx !@@: !add r10,16 !add r9,16 ;next 16 Bytes of Base$ !movdqu xmm1,[r10] ;next 16 Bytes of Find$ !pcmpistri xmm1,dqword[r9],00001100b ;compare the strings !jz Base$End !js Find$End !jrcxz @b !jmp Search !Base$End: !cmp rcx,16 !jne Found !xor rax,rax !jmp NoFound !Find$End: !or rcx,rcx ;RCX Zero? Conventional !jnz Search !Found: !add rax,rcx !NoFound: ProcedureReturn DisableASM EnableDebugger EndProcedure ; ********************************************************************************** ; this procedure takes a string, extracts anything numeric, and returns a number ; ********************************************************************************** Procedure.i ReturnJustNumerics(*stringPointer, stringLength.i, stringType.i = #PB_Unicode) Protected strIndex.i Protected thisChar.u Protected curString.s Protected newString.s Protected strPosition.i curString = PeekS(*stringPointer, stringLength, stringType) stringLength = StringByteLength(curString) For strIndex=1 To stringLength strPosition = (strIndex * 2) - 2 If strPosition < stringLength thisChar = PeekU(@curString + strPosition) If thisChar >= 48 And thisChar <= 57 newString + Chr(thisChar) EndIf EndIf Next ProcedureReturn Val(newString) EndProcedure ;===================================================================================================== ; main ;===================================================================================================== Global *unseenMessages = Ascii("[UNSEEN ") Global *closeBracket = Ascii("]") Global *unseenUID = Ascii("(UID ") Global *closeParen = Ascii(")") Define curlHandle.i ; first call the curl easy init curlHandle = curl_easy_init() If Not curlHandle PrintN("Unable to initialize curl") Input() End EndIf Define result.i Define emailUrl.s Define tryCount.i Define lastExist.i Define nextExist.i Define foundExist.i Define originalID.i Define messageUID.i Define customRequest.s Define messageNumber.i Define receiveAmount.i Define copySuccessful.i Define *spaceExist = Ascii(" EXIST") Define messageToGet.s = ";uid=" Define imapsUrl.s = "imaps://outlook.office.com/" Define inboxFolder.s = "Inbox/" Define archiveFolder.s = "Archive/" Define domainName.s = "new_domain/" Define messageYear.s = "2023/" PrintN("imapsUrl = " + imapsUrl) PBCurlEasySetOption(curlHandle, #CURLOPT_USERNAME, #CURL_TYPE_UTF8, @userName) PBCurlEasySetOption(curlHandle, #CURLOPT_PASSWORD, #CURL_TYPE_UTF8, @userPass) PBCurlEasySetOption(curlHandle, #CURLOPT_SSL_VERIFYPEER, #CURL_TYPE_LONG, @longFalse) PBCurlEasySetOption(curlHandle, #CURLOPT_SSL_VERIFYHOST, #CURL_TYPE_LONG, @longTrue) PBCurlEasySetOption(curlHandle, #CURLOPT_WRITEFUNCTION, #CURL_TYPE_POINTER, @PBCurlWriteData()) ; examine the inbox folder for new messages emailUrl = imapsUrl customRequest = "EXAMINE " + inboxFolder result = PBCurlEasyPerform(curlHandle.i, @emailUrl, @customRequest,@receiveAmount, *memoryArea) If result <> #CURLE_OK And result <> #CURLE_QUOTE_ERROR PrintN("Logon fatal error with IMAP email account") Input() End EndIf If receiveAmount > 0 PrintN(PeekS(*memoryArea, receiveAmount, #PB_UTF8)) EndIf PrintN("--------------------------------------------------------------------------------------------------") ; next, build the curl get message corresponding UID number command, then fetch the message messageNumber = ExtractRequiredNumber(*memoryArea, *unseenMessages, *closeBracket, 1, receiveAmount) If messageNumber < 1 Or messageNumber > 2147483647 PrintN("There are no unseen messages") Input() End EndIf ; get the uid number for the message originalID = messageNumber emailUrl = imapsUrl + inboxFolder customRequest = "fetch " + Str(messageNumber) + " uid" result = PBCurlEasyPerform(curlHandle.i, @emailUrl, @customRequest,@receiveAmount, *memoryArea) If receiveAmount > 0 PrintN(PeekS(*memoryArea, receiveAmount, #PB_UTF8)) EndIf PrintN("--------------------------------------------------------------------------------------------------") ; see if we have a valid UID message messageUID = ExtractRequiredNumber(*memoryArea, *unseenUID, *closeParen, 1, receiveAmount) If messageUID < 1 Or messageUID > 2147483647 PrintN("There are no unseen messages") Input() End EndIf PrintN("--------------------------------------------------------------------------------------------------") ; here we will mark the message read emailUrl = imapsUrl + inboxFolder customRequest = "uid store " + Str(messageUID) + " +Flags \Seen" result = PBCurlEasyPerform(curlHandle, @emailUrl, @customRequest, @receiveAmount, *memoryArea) If result <> #CURLE_OK PrintN("Unable to mark the message as read") Input() End EndIf PrintN("--------------------------------------------------------------------------------------------------") ; we will read in the email message body here emailUrl = imapsUrl + Left(inboxFolder, Len(inboxFolder) - 1) + ";uid=" + Str(messageUID) customRequest = "" receiveAmount = 0 ; send the command to the imap server to get the message body tryCount = 0 While tryCount < 5 tryCount + 1 result = PBCurlEasyPerform(curlHandle, @emailUrl, @customRequest, @receiveAmount, *memoryArea) If result = #CURLE_OK Break Else Delay(1000) EndIf Wend If result = #CURLE_OK And receiveAmount > 0 PrintN("Received " + Str(receiveAmount) + " bytes for the message body") Else PrintN("We were unable to read in the message body") Input() End EndIf PrintN("--------------------------------------------------------------------------------------------------") ; now archive the email copySuccessful = #False lastExist = -1 nextExist = -1 customRequest = "EXAMINE " + archiveFolder messageYear = FormatDate("%yyyy", Date()) ; here, we will examine the archive subfolder, to see if it exists result = PBCurlEasyPerform(curlHandle, @imapsUrl, @customRequest,@receiveAmount, *memoryArea) If result <> #CURLE_OK And result <> #CURLE_QUOTE_ERROR PrintN("Logon fatal error with IMAP email account") Input() End EndIf ; now, if we received #CURLE_FTP_QUOTE_ERROR, create the imap archive subfolder If result = #CURLE_QUOTE_ERROR customRequest = "CREATE " + archiveFolder result = PBCurlEasyPerform(curlHandle, @imapsUrl, @customRequest,@receiveAmount, *memoryArea) ; assuming we have received an ok here, re-examine the archive subfolder, it should now exist customRequest = "EXAMINE " + archiveFolder result = PBCurlEasyPerform(curlHandle, @imapsUrl, @customRequest,@receiveAmount, *memoryArea) EndIf ; here, we will examine the archive domain subfolder, to see if it exists If result = #CURLE_OK customRequest = "EXAMINE " + archiveFolder + domainName result = PBCurlEasyPerform(curlHandle, @imapsUrl, @customRequest,@receiveAmount, *memoryArea) ; now, if we received #CURLE_FTP_QUOTE_ERROR, create the imap archive domain subfolder If result = #CURLE_QUOTE_ERROR customRequest = "CREATE " + archiveFolder + domainName result = PBCurlEasyPerform(curlHandle, @imapsUrl, @customRequest,@receiveAmount, *memoryArea) ; assuming we have received an ok here, re-examine the archive domain subfolder, it should now exist customRequest = "EXAMINE " + archiveFolder + domainName result = PBCurlEasyPerform(curlHandle, @imapsUrl, @customRequest,@receiveAmount, *memoryArea) EndIf EndIf PrintN("--------------------------------------------------------------------------------------------------") ; here, we will examine the archive domain and year subfolder, to see if it exists If result = #CURLE_OK customRequest = "EXAMINE " + archiveFolder + domainName + messageYear result = PBCurlEasyPerform(curlHandle, @imapsUrl, @customRequest,@receiveAmount, *memoryArea) ; now, if we received #CURLE_FTP_QUOTE_ERROR, create the imap archive domain and year subfolder If result = #CURLE_QUOTE_ERROR customRequest = "CREATE " + archiveFolder + domainName + messageYear result = PBCurlEasyPerform(curlHandle, @imapsUrl, @customRequest,@receiveAmount, *memoryArea) ; assuming we have received an ok here, re-examine the archive domain and year subfolder, it should now exist customRequest = "EXAMINE " + archiveFolder + domainName + messageYear result = PBCurlEasyPerform(curlHandle, @imapsUrl, @customRequest,@receiveAmount, *memoryArea) EndIf EndIf PrintN("--------------------------------------------------------------------------------------------------") ; find out how many messages are currently in the archive domain and year folder If result = #CURLE_OK foundExist = FindInStringSSE42(*memoryArea, *spaceExist, 1) If foundExist > 0 And foundExist < receiveAmount lastExist = ReturnJustNumerics(*memoryArea, foundExist, #PB_Ascii) PrintN("lastExist count in " + archiveFolder + domainName + messageYear + " is " + Str(lastExist)) EndIf ; now, if we received #CURLE_OK, copy the message to the archive subfolder, but first, find out how many messages are currently in the folder tryCount = 0 While tryCount < 5 tryCount + 1 emailUrl = imapsUrl + inboxFolder customRequest = "uid copy " + Str(messageUID) + " " + archiveFolder + domainName + messageYear result = PBCurlEasyPerform(curlHandle, @emailUrl, @customRequest,@receiveAmount, *memoryArea) ; now, re-examine the archive subfolder, and see if the exist counter incremented If result = #CURLE_OK emailUrl = imapsUrl customRequest = "EXAMINE " + archiveFolder + domainName + messageYear result = PBCurlEasyPerform(curlHandle, @emailUrl, @customRequest,@receiveAmount, *memoryArea) ; if we received #CURLE_OK and received data in return, find the new count of the messages that exist in the archive subfolder If result = #CURLE_OK foundExist = FindInStringSSE42(*memoryArea, *spaceExist, 1) If foundExist > 0 And foundExist < receiveAmount nextExist = ReturnJustNumerics(*memoryArea, foundExist, #PB_Ascii) PrintN("nextExist count in " + archiveFolder + domainName + messageYear + " is " + Str(nextExist)) EndIf ; if the number of messages is higher than previous, the copy was successful If nextExist > lastExist copySuccessful = #True Print("Initial count in " + archiveFolder + domainName + messageYear) PrintN(" was " + Str(lastExist) + ", new count is " + Str(nextExist) + ", copy was successful") Break EndIf EndIf ; else sleep for one second, and try again Else Delay(1000) EndIf Wend EndIf PrintN("--------------------------------------------------------------------------------------------------") ; at this point, if we're still ok, delete the message from the inbox If copySuccessful emailUrl = imapsUrl + inboxFolder customRequest = "uid store " + Str(messageUID) + " +Flags \Deleted" tryCount = 0 While tryCount < 5 tryCount + 1 result = PBCurlEasyPerform(curlHandle, @emailUrl, @customRequest,@receiveAmount, *memoryArea) If result = #CURLE_OK Break Else Delay(1000) EndIf Wend ; and finally, expunge the message from the inbox If result = #CURLE_OK emailUrl = imapsUrl + inboxFolder customRequest = "EXPUNGE" tryCount = 0 While tryCount < 5 result = PBCurlEasyPerform(curlHandle, @emailUrl, @customRequest,@receiveAmount, *memoryArea) If result = #CURLE_OK PrintN("Delete and purge of the message from the Inbox was successful") Break Else Delay(1000) EndIf Wend EndIf ; otherwise, the copy was unsuccessful! Else Print("Initial count in " + archiveFolder + domainName + messageYear) PrintN(" was " + Str(lastExist) + ", new count is " + Str(nextExist) + ", copy was Not successful") EndIf ; now call curl easy cleanup functions curl_easy_cleanup(curlHandle) PrintN("curl_easy_cleanup() complete") Input() End ; IDE Options = PureBasic 5.73 LTS (Windows - x64) ; ExecutableFormat = Console ; CursorPosition = 13 ; EnableThread ; Executable = curl_imap_test.exe ; DisableDebugger ; HideErrorLog ; CompileSourceDirectory ; EnableCompileCount = 433 ; EnableBuildCount = 131 ; EnableExeConstant