Example 1: Using cURL to Send POST Data From a File To send the post data from the file, the “curl” command is utilized by specifying the name of the file. To do so, the “file.txt” is carried out, which is
--egd-file<file> EGD socket pathforrandom data--engine <name>Crypto engine to use--etag-save <file>Get an ETag from response header and save it to a FILE--etag-compare <file> Get an ETag from afileand send a conditional request--expect100-timeout <seconds> Howlongtowaitfor100-continue...
0 HOST[:PORT] Use HTTP/1.0 proxy on given port -p, --proxytunnel Operate through a HTTP proxy tunnel (using CONNECT) --pubkey KEY Public key file name (SSH) -Q, --quote CMD Send command(s) to server before transfer (F/SFTP) --random-file FILE File for reading random data from ...
0 HOST[:PORT] Use HTTP/1.0 proxy on given port -p, --proxytunnel Operate through a HTTP proxy tunnel (using CONNECT) --pubkey KEY Public key file name (SSH) -Q, --quote CMD Send command(s) to server before transfer (F/SFTP) --random-file FILE File for reading random data from ...
-O, --remote-name Write output to a file named as the remote file -s, --silent Silent mode -T, --upload-file <file> Transfer local FILE to destination -u, --user <user:password> Server user and password -A, --user-agent <name> Send User-Agent <name> to server ...
$ curl -X POST--data-urlencode"date=April 1"example.com/form.cgi curl 默认的 HTTP 动词是 GET,使用-X参数可以支持其他动词。 $ curl -X POST www.example.com $ curl-X DELETE www.example.com 这个字段是用来表示客户端的设备信息。服务器有时会根据这个字段,针对不同设备,返回不同格式的网页,比如...
CURLOPT_MAX_SEND_SPEED_LARGE 如果上传的速度超过了此速度(以每秒字节数来统计),即传输过程中累计的平均数 ,传输就会降速到这个参数的值。默认不限速。 cURL 7.15.5 中添加, PHP 5.4.0 有效。 CURLOPT_SSH_AUTH_TYPES A bitmask consisting of one or more of CURLSSH_AUTH_PUBLICKEY, CURLSSH_AUTH_PA...
curl -T - ftp:///myfile 1. Upload data from a specified file, login with user and password: 使用用户名和密码,上传指定文件到服务器上(在URL中指定远程文件名称): curl -T uploadfile -u user:passwd ftp:///myfile Upload a local file to the remote site, and use the local file name at...
data|filename> Send cookies from string/file-c, --cookie-jar <filename> Write cookies to <filename> after operation--create-dirs Create necessary local directory hierarchy--create-file-mode <mode> File mode (octal) for created files--crlf Convert LF to CRLF in upload--crlfile <file> ...
(using CONNECT) --pubkey KEY Public key file name (SSH) -Q, --quote CMD Send command(s) to server before transfer (F/SFTP) --random-file FILE File for reading random data from (SSL) -r, --range RANGE Retrieve only the bytes within a range --raw Do HTTP "raw", without any ...