Meet us at at Real World in Orlando, Florida.
All functions
Mac OS X
Windows
Crossplatform
Components
Guides
New in version:
2.0
2.1
2.2
2.3
2.4
2.5
2.6
2.7
2.8
CURL.Perform
Component: CURL
Version: 2.5
Mac OS X: Works
Windows: Works
MBS( "CURL.Perform" )
Parameters
| Parameter | Description | Example value |
|---|---|---|
| Handle | The CURL session handle. | $curl |
Result
Error code. 0 means everything was ok, non-zero means an error occurred. The number may be followed by a text description.
Description
Perform a file transfer.This function is called after the init and all the options are set, and will perform the transfer as described in the options. It must be called with the same handle as input as the CURL.New call returned.
You can do any amount of calls to CURL.Perform while using the same handle. If you intend to transfer more than one file, you are even encouraged to do so. CURL will then attempt to re-use the same connection for the following transfers, thus making the operations faster, less CPU intense and using less network resources. Just note that you will have to use the option functions between the invokes to set options for the following CURL.Perform.
You must never call this function simultaneously from two places using the same handle. Let the function return first before invoking it another time. If you want parallel transfers, you must use several curl handles.
While transfer is running, your Filemaker application is blocked. It's useful to show progress with using CURL.SetUpdateProgressDialog. Or you use CURL.PerformInBackground to run the transfer in background.
Internal buffer for output, debug and header data is cleared before the perform.
Typical error codes are 6 for a wrong domain name in the URL, 67 for wrong name/password combination, 60 for missing SSL settings, 1 for an unsupported protocol.
The list of possible error codes:
| Name | Number | Description | |
| CURLE_OK | 0 | No error. | |
| CURLE_UNSUPPORTED_PROTOCOL | 1 | Unsupported protocol. | |
| CURLE_FAILED_INIT | 2 | Initialization failed or option not available. | |
| CURLE_URL_MALFORMAT | 3 | URL has wrong format. | |
| CURLE_COULDNT_RESOLVE_PROXY | 5 | DNS didn't return proxy IP. | |
| CURLE_COULDNT_RESOLVE_HOST | 6 | DNS didn't return IP for host. | |
| CURLE_COULDNT_CONNECT | 7 | Connection failed. | |
| CURLE_FTP_WEIRD_SERVER_REPLY | 8 | FTP error. | |
| CURLE_REMOTE_ACCESS_DENIED | 9 | A service was denied by the server due to lack of access when login fails this is not returned. | |
| CURLE_FTP_WEIRD_PASS_REPLY | 11 | FTP error. | |
| CURLE_FTP_WEIRD_PASV_REPLY | 13 | FTP error. | |
| CURLE_FTP_WEIRD_227_FORMAT | 14 | FTP error. | |
| CURLE_FTP_CANT_GET_HOST | 15 | FTP error. | |
| CURLE_FTP_COULDNT_SET_TYPE | 17 | FTP set command failed. | |
| CURLE_PARTIAL_FILE | 18 | Only a part of the file was downloaded. | |
| CURLE_FTP_COULDNT_RETR_FILE | 19 | File not found. | |
| CURLE_QUOTE_ERROR | 21 | quote command failure | |
| CURLE_HTTP_RETURNED_ERROR | 22 | HTTP returned an error. | |
| CURLE_WRITE_ERROR | 23 | Write error. | |
| CURLE_UPLOAD_FAILED | 25 | failed upload "command" | |
| CURLE_READ_ERROR | 26 | couldn't open/read from file | |
| CURLE_OUT_OF_MEMORY | 27 | Out Of memory | |
| CURLE_OPERATION_TIMEDOUT | 28 | the timeout time was reached | |
| CURLE_FTP_PORT_FAILED | 30 | FTP PORT operation failed | |
| CURLE_FTP_COULDNT_USE_REST | 31 | the REST command failed | |
| CURLE_RANGE_ERROR | 33 | RANGE "command" didn't work | |
| CURLE_HTTP_POST_ERROR | 34 | HTTP Post failed. | |
| CURLE_SSL_CONNECT_ERROR | 35 | wrong when connecting with SSL | |
| CURLE_BAD_DOWNLOAD_RESUME | 36 | couldn't resume download | |
| CURLE_FILE_COULDNT_READ_FILE | 37 | Failed to read file. | |
| CURLE_LDAP_CANNOT_BIND | 38 | LDAP can't connect. | |
| CURLE_LDAP_SEARCH_FAILED | 39 | LDAP Search failed. | |
| CURLE_FUNCTION_NOT_FOUND | 41 | Function not found. | |
| CURLE_ABORTED_BY_CALLBACK | 42 | Transfer aborted with CURL.Cancel. | |
| CURLE_BAD_FUNCTION_ARGUMENT | 43 | Bad parameters. | |
| CURLE_INTERFACE_FAILED | 45 | CURL.OptionInterface failed | |
| 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_PEER_FAILED_VERIFICATION | 51 | peer's certificate or fingerprint wasn't verified fine | |
| 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 | can not set SSL crypto engine as default | |
| CURLE_SEND_ERROR | 55 | failed sending network data | |
| CURLE_RECV_ERROR | 56 | failure in receiving network data | |
| 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_USE_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 | user, password or similar was not accepted and we failed to login | |
| CURLE_TFTP_NOTFOUND | 68 | file not found on server | |
| CURLE_TFTP_PERM | 69 | permission problem on server | |
| CURLE_REMOTE_DISK_FULL | 70 | out of disk space on server | |
| CURLE_TFTP_ILLEGAL | 71 | Illegal TFTP operation | |
| CURLE_TFTP_UNKNOWNID | 72 | Unknown transfer ID | |
| CURLE_REMOTE_FILE_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 | |
| 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. | |
| CURLE_SSL_CRL_BADFILE | 82 | could not load CRL file, missing or wrong format. | |
| CURLE_SSL_ISSUER_ERROR | 83 | Issuer check failed. | |
| 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 Identifiers | |
| CURLE_FTP_BAD_FILE_LIST | 87 | unable to parse FTP file list | |
| CURLE_CHUNK_FAILED | 88 | chunk callback reported error |
Feedback: Report problem or ask question.
Links
MBS REAL studio Plugins - Pfarrgemeinde St. Arnulf Nickenich