• Home
  • Raw
  • Download

Lines Matching full:curl

1 # curl tutorial
7 curl https://www.example.com/
11 curl ftp://ftp.funet.fi/README
15 curl http://www.weirdserver.com:8000/
19 curl ftp://ftp.funet.fi
21 Get the definition of curl from a dictionary:
23 curl dict://dict.org/m:curl
27 curl ftp://ftp.funet.fi/ http://www.weirdserver.com:8000/
31 curl ftps://files.are.secure.com/secrets.txt
35 curl --ftp-ssl ftp://files.are.secure.com/secrets.txt
39 curl -u username sftp://example.com/etc/issue
44 curl -u username: --key ~/.ssh/id_rsa scp://example.com/~/file.txt
49 curl -u username: --key ~/.ssh/id_rsa --pass private_key_password
54 curl "http://[2001:1890:1112:1::20]/"
58 curl -u "domain\username:passwd" smb://server.example.com/share/file.txt
64 curl -o thatpage.html http://www.example.com/
70 curl -O http://www.example.com/index.html
74 curl -O www.haxx.se/index.html -O curl.se/download.html
82 curl ftp://name:passwd@machine.domain:port/full/path/to/file
86 curl -u name:passwd ftp://machine.domain:port/full/path/to/file
103 Typically, curl will automatically extract the public key from the private key
104 file, but in cases where curl does not have the proper library support, a
109 Curl also supports user and password in HTTP URLs, thus you can pick a file
112 curl http://name:passwd@machine.domain/full/path/to/file
116 curl -u name:passwd http://machine.domain/full/path/to/file
118 HTTP offers many different methods of authentication and curl supports
120 method to use, curl defaults to Basic. You can also ask curl to pick the most
125 and password, so that style will not work when using curl via a proxy, even
126 though curl allows it at other times. When using a proxy, you _must_ use the
135 curl supports both HTTP and SOCKS proxy servers, with optional authentication.
143 curl -x my-proxy:888 ftp://ftp.leachsite.com/README
148 curl -u user:passwd -x my-proxy:888 http://www.get.this/
152 curl -U user:passwd -x my-proxy:888 http://www.get.this/
157 curl --noproxy localhost,get.this -x my-proxy:888 http://www.get.this/
160 curl will use HTTP/1.0 instead of HTTP/1.1 for any `CONNECT` attempts.
162 curl also supports SOCKS4 and SOCKS5 proxies with `--socks4` and `--socks5`.
164 See also the environment variables Curl supports that offer further proxy
169 curl supports the `-u`, `-Q` and `--ftp-account` options that can be used to
173 curl -u "username@ftp.server Proxy-Username:Remote-Pass"
178 transfers, and curl's `-v` option to see exactly what curl is sending.
183 one or more subparts of a specified document. Curl supports this with the `-r`
188 curl -r 0-99 http://www.get.this/
192 curl -r -500 http://www.get.this/
194 Curl also supports simple ranges for FTP files as well. Then you can only
199 curl -r 0-99 ftp://www.get.this/README
207 curl -T - ftp://ftp.upload.com/myfile
211 curl -T uploadfile -u user:passwd ftp://ftp.upload.com/myfile
216 curl -T uploadfile -u user:passwd ftp://ftp.upload.com/
220 curl -T localfile -a ftp://ftp.upload.com/remotefile
222 Curl also supports ftp upload through a proxy, but only if the proxy is
223 configured to allow that kind of tunneling. If it does, you can run curl in a
226 curl --proxytunnel -x proxy:port -T localfile ftp.upload.com
230 curl -T file.txt -u "domain\username:passwd"
237 curl -T - http://www.upload.com/myfile
246 If curl fails where it isn't supposed to, if the servers don't let you in, if
248 fetching. Curl will output lots of info and what it sends and receives in
252 curl -v ftp://ftp.upload.com/
254 To get even more details and information on what curl does, try using the
258 curl --trace trace.txt www.haxx.se
264 about specific files/documents. To get curl to show detailed information about
270 shown before the data by using `-i`/`--include`. Curl understands the
276 curl --dump-header headers.txt curl.se
279 if you want curl to use cookies sent by the server. More about that in the
284 It's easy to post data using curl. This is done using the `-d <data>` option.
289 curl -d "name=Rafael%20Sagula&phone=3320780" http://www.where.com/guest.cgi
291 How to post a form with curl, lesson #1:
321 To post to this, you enter a curl command line like:
323 curl -d "user=foobar&pass=12345&id=blablabla&ding=submit"
327 understood by CGI's and similar, curl also supports the more capable
337 curl -F "coolfiles=@fil1.gif;type=image/gif,fil2.txt,fil3.html"
340 If the content-type is not specified, curl will try to guess from the file
348 "cooltext.txt". To let curl do the posting of this data instead of your
353 curl -F "file=@cooltext.txt" -F "yourname=Daniel"
361 curl -F "pictures=@dog.gif,cat.gif" $URL
365 curl -F "docpicture=@dog.gif" -F "catpicture=@cat.gif" $URL
371 allow a user to trick curl into uploading a file.
376 referred it to the actual page. Curl allows you to specify the referrer to be
381 curl -e www.coolsite.com http://www.showme.com/
386 generated the request. Curl allows it to be specified on the command line. It
392 curl -A 'Mozilla/3.0 (Win95; I)' http://www.nationsbank.com/
433 curl -b "name=Daniel" www.sillypage.com
435 Curl also has the ability to use previously received cookies in following
439 curl --dump-header headers www.example.com
444 curl -b headers www.example.com
447 however error-prone and not the preferred way to do this. Instead, make curl
451 curl -c cookies.txt www.example.com
454 you can make curl follow a location: (which often is used in combination with
458 curl -L -b empty.txt www.example.com
461 netscape's cookie file. Curl will determine what kind it is based on the file
462 contents. In the above command, curl will parse the header and store the
463 cookies received from www.example.com. curl will send to the server the
470 curl -b cookies.txt -c cookies.txt www.example.com
502 Curl allows the user to set the transfer speed conditions that must be met to
504 curl abort transfers if the transfer speed is below the specified lowest limit
507 To have curl abort the download if the speed is slower than 3000 bytes per
510 curl -Y 3000 -y 60 www.far-away-site.com
515 curl -m 1800 -Y 3000 -y 60 www.far-away-site.com
517 Forcing curl not to transfer data faster than a given rate is also possible,
522 Make curl transfer data no faster than 10 kilobytes per second:
524 curl --limit-rate 10K www.far-away-site.com
528 curl --limit-rate 10240 www.far-away-site.com
530 Or prevent curl from uploading data faster than 1 megabyte per second:
532 curl -T upload --limit-rate 1M ftp://uploadshereplease.com
541 Curl automatically tries to read the `.curlrc` file (or `_curlrc` file on
566 Prevent curl from reading the default file by using -q as the first command
569 curl -q www.thatsite.com
571 Force curl to get and display a local help page in case it is invoked without
575 url = "http://help.with.curl.com/curlhelp.html"
582 echo "user = user:passwd" | curl -K - http://that.secret.site.com
586 When using curl in your own very special programs, you may end up needing
593 curl -H "X-you-and-me: yes" www.love.com
595 This can also be useful in case you want curl to send a different text in a
597 header curl would normally send. If you replace an internal header with an
601 curl -H "Host:" www.server.com
609 curl ftp://user:passwd@my.site.com/README
614 curl ftp://user:passwd@my.site.com//README
624 curl -u $USER sftp://home.example.com/~/.bashrc
632 The default way for curl is to issue the PASV command which causes the server
637 curl ftp.download.com
645 The `-P` flag to curl supports a few different options. Your machine may have
646 several IP-addresses and/or network interfaces and curl allows you to select
649 curl -P - ftp.download.com
654 curl -P le0 ftp.download.com
658 curl -P 192.168.0.10 ftp.download.com
664 curl --interface eth0:1 http://www.example.com/
668 curl --interface 192.168.1.10 http://www.example.com/
672 Secure HTTP requires a TLS library to be installed and used when curl is
673 built. If that is done, curl is capable of retrieving and posting documents
678 curl https://www.secure-site.com
680 curl is also capable of using client certificates to get/post files from sites
684 you want curl to use the certificates you use with your (favourite) browser,
691 curl -E /path/to/cert.pem:password https://secure.site.com/
698 specify what SSL-version curl should use. Use -3, -2 or -1 to specify that
701 curl -2 https://secure.site.com/
703 Otherwise, curl will attempt to use a sensible TLS default version.
707 To continue a file transfer where it was previously aborted, curl supports
712 curl -C - -o file ftp://ftp.server.com/path/file
716 curl -C - -T file ftp://ftp.server.com/path/file
720 curl -C - -o file http://www.server.com/
725 It is `If-Modified-Since` or `If-Unmodified-Since`. curl allows you to specify
731 curl -z local.html http://remote.server.com/remote.html
736 curl -z -local.html http://remote.server.com/remote.html
738 You can specify a "free text" date as condition. Tell curl to only download
741 curl -z "Jan 12 2012" http://remote.server.com/remote.html
743 Curl will then accept a wide range of date formats. You always make the date
750 curl dict://dict.org/m:curl
751 curl dict://dict.org/d:heisenbug:jargon
752 curl dict://dict.org/d:daniel:gcide
757 curl dict://dict.org/find:curl
762 curl dict://dict.org/show:db
763 curl dict://dict.org/show:strat
769 If you have installed the OpenLDAP library, curl can take advantage of it and
770 offer `ldap://` support. On Windows, curl will use WinLDAP from Platform SDK
773 Default protocol version used by curl is LDAPv3. LDAPv2 will be used as
779 Format](https://curl.se/rfc/rfc2255.txt)
784 curl -B "ldap://ldap.frontec.se/o=frontec??sub?mail=*sth.frontec.se"
791 curl -u user:passwd "ldap://ldap.frontec.se/o=frontec??sub?mail=*"
792 curl "ldap://user:passwd@ldap.frontec.se/o=frontec??sub?mail=*"
796 `--basic`, `--ntlm` or `--digest` option in curl command line
798 curl --ntlm "ldap://user:passwd@ldap.frontec.se/o=frontec??sub?mail=*"
805 Curl reads and understands the following environment variables:
836 by yourself (curl doesn't care though).
838 Curl supports `.netrc` files if told to (using the `-n`/`--netrc` and
839 `--netrc-optional` options). This is not restricted to just FTP, so curl can
844 machine curl.se login iamdaniel password mysecret
848 To better allow script programmers to get to know about the progress of curl,
855 curl -w 'We downloaded %{size_download} bytes\n' www.download.com
859 Curl supports kerberos4 and kerberos5/GSSAPI for FTP transfers. You need the
860 kerberos package installed and used at curl build time for it to be available.
863 Then use curl in way similar to:
865 curl --krb private ftp://krb4site.com -u username:fakepwd
868 curl ask for one and you already entered the real password to kinit/kauth.
872 The curl telnet support is basic and very easy to use. Curl passes all data
876 curl telnet://remote.server.com
887 curl -tTTYPE=vt100 telnet://remote.server.com
895 user and password so curl can't do that automatically. To do that, you need to
901 Specifying multiple files on a single command line will make curl transfer all
910 Note that curl cannot use persistent connections for transfers that are used
911 in subsequence curl invokes. Try to stuff as many URLs as possible on the same
927 curl -O http://url.com/file.txt ftp://ftp.com/moo.exe -o moo.jpg
931 curl -T local1 ftp://ftp.com/moo.exe -T local2 ftp://ftp.com/moo2.txt
935 curl will connect to a server with IPv6 when a host lookup returns an IPv6
943 When this style is used, the `-g` option must be given to stop curl from
957 For your convenience, we have several open mailing lists to discuss curl, its
959 https://curl.se/mail/.
961 Please direct curl questions, feature requests and trouble reports to one of
966 ### curl-users
972 ### curl-library
976 ### curl-announce
982 ### curl-and-php
984 Using the curl functions in PHP. Everything curl with a PHP angle. Or PHP with
985 a curl angle.
987 ### curl-and-python
989 Python hackers using curl with or without the python binding pycurl.