| CLI Flag |
curl_setopt( ) |
Description |
| --cacert <CA certificate> |
CURLOPT_CAINFO |
The name of a file holding one or more certificates to verify the peer with |
| --capath <CA certificate directory> |
CURLOPT_CAPATH |
A directory that holds multiple CA certificates |
| -b/--cookie <name=data> |
CURLOPT_COOKIE |
The contents of the "Cookie: " header to be used in the HTTP request |
| -b/--cookie <file> |
CURLOPT_COOKIEFILE |
The name of the file containing the cookie data |
| -c/--cookie-jar <file> |
CURLOPT_COOKIEJAR |
The name of a file to save all internal cookies to when the handle is closed |
| -X/--request <command> |
CURLOPT_CUSTOMREQUEST |
A custom request method to use instead of "GET" or "HEAD" when doing a HTTP request |
| --egd-file <file> |
CURLOPT_EGDSOCKET |
A filename to an Entropy Gathering Daemon socket |
| -H/--header "Accept-Encoding: gzip,deflate" |
CURLOPT_ENCODING |
The contents of the "Accept-Encoding: " header. This enables decoding of the response. |
| -P/--ftp-port <address> |
CURLOPT_FTPPORT |
The value which will be used to get the IP address to use for the FTP "POST" instruction. The "POST" instruction tells the remote server to connect to our specified IP address |
| --interface <name> |
CURLOPT_INTERFACE |
The name of the outgoing network interface to use. This can be an interface name, an IP address or a host name |
| --krb <level> |
CURLOPT_KRB4LEVEL |
The Kerberos 4 security level. Any of the following values (in order from least to most powerful) are valid: "clear", "safe", "confidential", "private" |
| -d/--data <data> |
CURLOPT_POSTFIELDS |
The full data to post in a HTTP "POST" operation. To post a file, prepend a filename with @ and use the full path. The filetype can be explicitly specified by following the filename with the type in the format ';type=mimetype'. This parameter can either be passed as a urlencoded string like 'para1=val1¶2=val2&...' or as an array with the field name as key and field data as value. If value is an array, the Content-Type header will be set to multipart/form-data. As of PHP 5.2.0, value must be an array if files are passed to this option with the @ prefix. |
| -x/--proxy <proxyhost[:port]> |
CURLOPT_PROXY |
The HTTP proxy to tunnel requests through |
| -U/--proxy-user <user:password> |
CURLOPT_PROXYUSERPWD |
A username and password formatted as "[username]:[password]" to use for the connection to the proxy |
| --random-file <file> |
CURLOPT_RANDOM_FILE |
A filename to be used to seed the random number generator for SSL |
| -r/--range <range> |
CURLOPT_RANGE |
Range(s) of data to retrieve in the format "X-Y" where X or Y are optional. HTTP transfers also support several intervals, separated with commas in the format "X-Y,N-M" |
| -e/--referer <URL> |
CURLOPT_REFERER |
The contents of the "Referer: " header to be used in a HTTP request |
| --ciphers <list of ciphers> |
CURLOPT_SSL_CIPHER_LIST |
A list of ciphers to use for SSL. For example, RC4-SHA and TLSv1 are valid cipher lists |
| -E/--cert <certificate[:password]> |
CURLOPT_SSLCERT |
The name of a file containing a PEM formatted certificate |
| -E/--cert <certificate[:password]> |
CURLOPT_SSLCERTPASSWD |
The password required to use the CURLOPT_SSLCERT certificate |
| --cert-type <type> |
CURLOPT_SSLCERTTYPE |
The format of the certificate. Supported formats are "PEM" (default), "DER", and "ENG" |
| --engine <name> |
CURLOPT_SSLENGINE |
The identifier for the crypto engine of the private SSL key specified in CURLOPT_SSLKEY |
| --key <key> |
CURLOPT_SSLKEY |
The name of a file containing a private SSL key |
| --pass <phrase> |
CURLOPT_SSLKEYPASSWD |
The secret password needed to use the private SSL key specified in CURLOPT_SSLKEY |
| --key-type <type> |
CURLOPT_SSLKEYTYPE |
The key type of the private SSL key specified in CURLOPT_SSLKEY. Supported key types are "PEM" (default), "DER", and "ENG" |
| -A/--user-agent <agent> |
CURLOPT_USERAGENT |
The contents of the "User-Agent: " header to be used in a HTTP request |
| -u/--user <user:password> |
CURLOPT_USERPWD |
A username and password formatted as "[username]:[password]" to use for the connection |