]> icculus.org git repositories - icculus/iodoom3.git/blob - neo/curl/docs/MANUAL
hello world
[icculus/iodoom3.git] / neo / curl / docs / MANUAL
1 LATEST VERSION
2
3   You always find news about what's going on as well as the latest versions
4   from the curl web pages, located at:
5
6         http://curl.haxx.se
7
8 SIMPLE USAGE
9
10   Get the main page from netscape's web-server:
11
12         curl http://www.netscape.com/
13
14   Get the README file the user's home directory at funet's ftp-server:
15
16         curl ftp://ftp.funet.fi/README
17
18   Get a web page from a server using port 8000:
19
20         curl http://www.weirdserver.com:8000/
21
22   Get a list of a directory of an FTP site:
23
24         curl ftp://cool.haxx.se/
25
26   Get a gopher document from funet's gopher server:
27
28         curl gopher://gopher.funet.fi
29
30   Get the definition of curl from a dictionary:
31
32         curl dict://dict.org/m:curl
33
34   Fetch two documents at once:
35
36         curl ftp://cool.haxx.se/ http://www.weirdserver.com:8000/
37
38 DOWNLOAD TO A FILE
39
40   Get a web page and store in a local file:
41
42         curl -o thatpage.html http://www.netscape.com/
43
44   Get a web page and store in a local file, make the local file get the name
45   of the remote document (if no file name part is specified in the URL, this
46   will fail):
47
48         curl -O http://www.netscape.com/index.html
49
50   Fetch two files and store them with their remote names:
51
52         curl -O www.haxx.se/index.html -O curl.haxx.se/download.html
53
54 USING PASSWORDS
55
56  FTP
57
58    To ftp files using name+passwd, include them in the URL like:
59
60         curl ftp://name:passwd@machine.domain:port/full/path/to/file
61
62    or specify them with the -u flag like
63
64         curl -u name:passwd ftp://machine.domain:port/full/path/to/file
65
66  HTTP
67
68    The HTTP URL doesn't support user and password in the URL string. Curl
69    does support that anyway to provide a ftp-style interface and thus you can
70    pick a file like:
71
72         curl http://name:passwd@machine.domain/full/path/to/file
73
74    or specify user and password separately like in
75
76         curl -u name:passwd http://machine.domain/full/path/to/file
77
78    NOTE! Since HTTP URLs don't support user and password, you can't use that
79    style when using Curl via a proxy. You _must_ use the -u style fetch
80    during such circumstances.
81
82  HTTPS
83
84    Probably most commonly used with private certificates, as explained below.
85
86  GOPHER
87
88    Curl features no password support for gopher.
89
90 PROXY
91
92  Get an ftp file using a proxy named my-proxy that uses port 888:
93
94         curl -x my-proxy:888 ftp://ftp.leachsite.com/README
95
96  Get a file from a HTTP server that requires user and password, using the
97  same proxy as above:
98
99         curl -u user:passwd -x my-proxy:888 http://www.get.this/
100
101  Some proxies require special authentication. Specify by using -U as above:
102
103         curl -U user:passwd -x my-proxy:888 http://www.get.this/
104
105  See also the environment variables Curl support that offer further proxy
106  control.
107
108 RANGES
109
110   With HTTP 1.1 byte-ranges were introduced. Using this, a client can request
111   to get only one or more subparts of a specified document. Curl supports
112   this with the -r flag.
113
114   Get the first 100 bytes of a document:
115
116         curl -r 0-99 http://www.get.this/
117
118   Get the last 500 bytes of a document:
119
120         curl -r -500 http://www.get.this/
121
122   Curl also supports simple ranges for FTP files as well. Then you can only
123   specify start and stop position.
124
125   Get the first 100 bytes of a document using FTP:
126
127         curl -r 0-99 ftp://www.get.this/README  
128
129 UPLOADING
130
131  FTP
132
133   Upload all data on stdin to a specified ftp site:
134
135         curl -T - ftp://ftp.upload.com/myfile
136
137   Upload data from a specified file, login with user and password:
138
139         curl -T uploadfile -u user:passwd ftp://ftp.upload.com/myfile
140
141   Upload a local file to the remote site, and use the local file name remote
142   too:
143  
144         curl -T uploadfile -u user:passwd ftp://ftp.upload.com/
145
146   Upload a local file to get appended to the remote file using ftp:
147
148         curl -T localfile -a ftp://ftp.upload.com/remotefile
149
150   Curl also supports ftp upload through a proxy, but only if the proxy is
151   configured to allow that kind of tunneling. If it does, you can run curl in
152   a fashion similar to:
153
154         curl --proxytunnel -x proxy:port -T localfile ftp.upload.com
155
156  HTTP
157
158   Upload all data on stdin to a specified http site:
159
160         curl -T - http://www.upload.com/myfile
161
162   Note that the http server must've been configured to accept PUT before this
163   can be done successfully.
164
165   For other ways to do http data upload, see the POST section below.
166
167 VERBOSE / DEBUG
168
169   If curl fails where it isn't supposed to, if the servers don't let you in,
170   if you can't understand the responses: use the -v flag to get verbose
171   fetching. Curl will output lots of info and what it sends and receives in
172   order to let the user see all client-server interaction (but it won't show
173   you the actual data).
174
175         curl -v ftp://ftp.upload.com/
176
177   To get even more details and information on what curl does, try using the
178   --trace or --trace-ascii options with a given file name to log to, like
179   this:
180
181         curl --trace trace.txt www.haxx.se
182  
183
184 DETAILED INFORMATION
185
186   Different protocols provide different ways of getting detailed information
187   about specific files/documents. To get curl to show detailed information
188   about a single file, you should use -I/--head option. It displays all
189   available info on a single file for HTTP and FTP. The HTTP information is a
190   lot more extensive.
191
192   For HTTP, you can get the header information (the same as -I would show)
193   shown before the data by using -i/--include. Curl understands the
194   -D/--dump-header option when getting files from both FTP and HTTP, and it
195   will then store the headers in the specified file.
196
197   Store the HTTP headers in a separate file (headers.txt in the example):
198
199         curl --dump-header headers.txt curl.haxx.se
200
201   Note that headers stored in a separate file can be very useful at a later
202   time if you want curl to use cookies sent by the server. More about that in
203   the cookies section.
204
205 POST (HTTP)
206
207   It's easy to post data using curl. This is done using the -d <data>
208   option.  The post data must be urlencoded.
209
210   Post a simple "name" and "phone" guestbook.
211
212         curl -d "name=Rafael%20Sagula&phone=3320780" \
213                 http://www.where.com/guest.cgi
214
215   How to post a form with curl, lesson #1:
216
217   Dig out all the <input> tags in the form that you want to fill in. (There's
218   a perl program called formfind.pl on the curl site that helps with this).
219
220   If there's a "normal" post, you use -d to post. -d takes a full "post
221   string", which is in the format
222
223         <variable1>=<data1>&<variable2>=<data2>&...
224
225   The 'variable' names are the names set with "name=" in the <input> tags, and
226   the data is the contents you want to fill in for the inputs. The data *must*
227   be properly URL encoded. That means you replace space with + and that you
228   write weird letters with %XX where XX is the hexadecimal representation of
229   the letter's ASCII code.
230
231   Example:
232
233   (page located at http://www.formpost.com/getthis/
234
235         <form action="post.cgi" method="post">
236         <input name=user size=10>
237         <input name=pass type=password size=10>
238         <input name=id type=hidden value="blablabla">
239         <input name=ding value="submit">
240         </form>
241
242   We want to enter user 'foobar' with password '12345'.
243
244   To post to this, you enter a curl command line like:
245
246         curl -d "user=foobar&pass=12345&id=blablabla&ding=submit"  (continues)
247           http://www.formpost.com/getthis/post.cgi
248
249
250   While -d uses the application/x-www-form-urlencoded mime-type, generally
251   understood by CGI's and similar, curl also supports the more capable
252   multipart/form-data type. This latter type supports things like file upload.
253
254   -F accepts parameters like -F "name=contents". If you want the contents to
255   be read from a file, use <@filename> as contents. When specifying a file,
256   you can also specify the file content type by appending ';type=<mime type>'
257   to the file name. You can also post the contents of several files in one
258   field.  For example, the field name 'coolfiles' is used to send three files,
259   with different content types using the following syntax:
260
261         curl -F "coolfiles=@fil1.gif;type=image/gif,fil2.txt,fil3.html" \
262         http://www.post.com/postit.cgi
263
264   If the content-type is not specified, curl will try to guess from the file
265   extension (it only knows a few), or use the previously specified type (from
266   an earlier file if several files are specified in a list) or else it will
267   using the default type 'text/plain'.
268
269   Emulate a fill-in form with -F. Let's say you fill in three fields in a
270   form. One field is a file name which to post, one field is your name and one
271   field is a file description. We want to post the file we have written named
272   "cooltext.txt". To let curl do the posting of this data instead of your
273   favourite browser, you have to read the HTML source of the form page and
274   find the names of the input fields. In our example, the input field names
275   are 'file', 'yourname' and 'filedescription'.
276
277         curl -F "file=@cooltext.txt" -F "yourname=Daniel" \
278              -F "filedescription=Cool text file with cool text inside" \
279              http://www.post.com/postit.cgi
280
281   To send two files in one post you can do it in two ways:
282
283   1. Send multiple files in a single "field" with a single field name:
284  
285         curl -F "pictures=@dog.gif,cat.gif" 
286  
287   2. Send two fields with two field names: 
288
289         curl -F "docpicture=@dog.gif" -F "catpicture=@cat.gif" 
290
291 REFERRER
292
293   A HTTP request has the option to include information about which address
294   that referred to actual page.  Curl allows you to specify the
295   referrer to be used on the command line. It is especially useful to
296   fool or trick stupid servers or CGI scripts that rely on that information
297   being available or contain certain data.
298
299         curl -e www.coolsite.com http://www.showme.com/
300
301   NOTE: The referer field is defined in the HTTP spec to be a full URL.
302
303 USER AGENT
304
305   A HTTP request has the option to include information about the browser
306   that generated the request. Curl allows it to be specified on the command
307   line. It is especially useful to fool or trick stupid servers or CGI
308   scripts that only accept certain browsers.
309
310   Example:
311
312   curl -A 'Mozilla/3.0 (Win95; I)' http://www.nationsbank.com/
313
314   Other common strings:
315     'Mozilla/3.0 (Win95; I)'     Netscape Version 3 for Windows 95
316     'Mozilla/3.04 (Win95; U)'    Netscape Version 3 for Windows 95
317     'Mozilla/2.02 (OS/2; U)'     Netscape Version 2 for OS/2
318     'Mozilla/4.04 [en] (X11; U; AIX 4.2; Nav)'           NS for AIX
319     'Mozilla/4.05 [en] (X11; U; Linux 2.0.32 i586)'      NS for Linux
320
321   Note that Internet Explorer tries hard to be compatible in every way:
322     'Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)'    MSIE for W95
323
324   Mozilla is not the only possible User-Agent name:
325     'Konqueror/1.0'             KDE File Manager desktop client
326     'Lynx/2.7.1 libwww-FM/2.14' Lynx command line browser
327
328 COOKIES
329
330   Cookies are generally used by web servers to keep state information at the
331   client's side. The server sets cookies by sending a response line in the
332   headers that looks like 'Set-Cookie: <data>' where the data part then
333   typically contains a set of NAME=VALUE pairs (separated by semicolons ';'
334   like "NAME1=VALUE1; NAME2=VALUE2;"). The server can also specify for what
335   path the "cookie" should be used for (by specifying "path=value"), when the
336   cookie should expire ("expire=DATE"), for what domain to use it
337   ("domain=NAME") and if it should be used on secure connections only
338   ("secure").
339
340   If you've received a page from a server that contains a header like:
341         Set-Cookie: sessionid=boo123; path="/foo";
342
343   it means the server wants that first pair passed on when we get anything in
344   a path beginning with "/foo".
345
346   Example, get a page that wants my name passed in a cookie:
347
348         curl -b "name=Daniel" www.sillypage.com
349
350   Curl also has the ability to use previously received cookies in following
351   sessions. If you get cookies from a server and store them in a file in a
352   manner similar to:
353
354         curl --dump-header headers www.example.com
355
356   ... you can then in a second connect to that (or another) site, use the
357   cookies from the 'headers' file like:
358
359         curl -b headers www.example.com
360
361   While saving headers to a file is a working way to store cookies, it is
362   however error-prone and not the prefered way to do this. Instead, make curl
363   save the incoming cookies using the well-known netscape cookie format like
364   this:
365
366         curl -c cookies.txt www.example.com
367
368   Note that by specifying -b you enable the "cookie awareness" and with -L
369   you can make curl follow a location: (which often is used in combination
370   with cookies). So that if a site sends cookies and a location, you can
371   use a non-existing file to trigger the cookie awareness like:
372
373         curl -L -b empty.txt www.example.com
374
375   The file to read cookies from must be formatted using plain HTTP headers OR
376   as netscape's cookie file. Curl will determine what kind it is based on the
377   file contents.  In the above command, curl will parse the header and store
378   the cookies received from www.example.com.  curl will send to the server the
379   stored cookies which match the request as it follows the location.  The
380   file "empty.txt" may be a non-existant file.
381
382   Alas, to both read and write cookies from a netscape cookie file, you can
383   set both -b and -c to use the same file:
384
385         curl -b cookies.txt -c cookies.txt www.example.com
386
387 PROGRESS METER
388
389   The progress meter exists to show a user that something actually is
390   happening. The different fields in the output have the following meaning:
391
392   % Total    % Received % Xferd  Average Speed          Time             Curr.
393                                  Dload  Upload Total    Current  Left    Speed
394   0  151M    0 38608    0     0   9406      0  4:41:43  0:00:04  4:41:39  9287
395
396   From left-to-right:
397    %             - percentage completed of the whole transfer
398    Total         - total size of the whole expected transfer
399    %             - percentage completed of the download
400    Received      - currently downloaded amount of bytes
401    %             - percentage completed of the upload
402    Xferd         - currently uploaded amount of bytes
403    Average Speed
404    Dload         - the average transfer speed of the download
405    Average Speed
406    Upload        - the average transfer speed of the upload
407    Time Total    - expected time to complete the operation
408    Time Current  - time passed since the invoke
409    Time Left     - expected time left to completetion
410    Curr.Speed    - the average transfer speed the last 5 seconds (the first
411                    5 seconds of a transfer is based on less time of course.)
412
413   The -# option will display a totally different progress bar that doesn't
414   need much explanation!
415
416 SPEED LIMIT
417
418   Curl allows the user to set the transfer speed conditions that must be met
419   to let the transfer keep going. By using the switch -y and -Y you
420   can make curl abort transfers if the transfer speed is below the specified
421   lowest limit for a specified time.
422
423   To have curl abort the download if the speed is slower than 3000 bytes per
424   second for 1 minute, run:
425
426         curl -Y 3000 -y 60 www.far-away-site.com
427
428   This can very well be used in combination with the overall time limit, so
429   that the above operatioin must be completed in whole within 30 minutes:
430
431         curl -m 1800 -Y 3000 -y 60 www.far-away-site.com
432
433   Forcing curl not to transfer data faster than a given rate is also possible,
434   which might be useful if you're using a limited bandwidth connection and you
435   don't want your transfer to use all of it (sometimes referred to as
436   "bandwith throttle").
437
438   Make curl transfer data no faster than 10 kilobytes per second:
439
440         curl --limit-rate 10K www.far-away-site.com
441
442     or
443
444         curl --limit-rate 10240 www.far-away-site.com
445
446   Or prevent curl from uploading data faster than 1 megabyte per second:
447
448         curl -T upload --limit-rate 1M ftp://uploadshereplease.com
449
450   When using the --limit-rate option, the transfer rate is regulated on a
451   per-second basis, which will cause the total transfer speed to become lower
452   than the given number. Sometimes of course substantially lower, if your
453   transfer stalls during periods.
454
455 CONFIG FILE
456
457   Curl automatically tries to read the .curlrc file (or _curlrc file on win32
458   systems) from the user's home dir on startup.
459
460   The config file could be made up with normal command line switches, but you
461   can also specify the long options without the dashes to make it more
462   readable. You can separate the options and the parameter with spaces, or
463   with = or :. Comments can be used within the file. If the first letter on a
464   line is a '#'-letter the rest of the line is treated as a comment.
465
466   If you want the parameter to contain spaces, you must inclose the entire
467   parameter within double quotes ("). Within those quotes, you specify a
468   quote as \".
469
470   NOTE: You must specify options and their arguments on the same line.
471
472   Example, set default time out and proxy in a config file:
473
474         # We want a 30 minute timeout:
475         -m 1800
476         # ... and we use a proxy for all accesses:
477         proxy = proxy.our.domain.com:8080
478
479   White spaces ARE significant at the end of lines, but all white spaces
480   leading up to the first characters of each line are ignored.
481
482   Prevent curl from reading the default file by using -q as the first command
483   line parameter, like:
484
485         curl -q www.thatsite.com
486
487   Force curl to get and display a local help page in case it is invoked
488   without URL by making a config file similar to:
489
490         # default url to get
491         url = "http://help.with.curl.com/curlhelp.html"
492
493   You can specify another config file to be read by using the -K/--config
494   flag. If you set config file name to "-" it'll read the config from stdin,
495   which can be handy if you want to hide options from being visible in process
496   tables etc:
497
498         echo "user = user:passwd" | curl -K - http://that.secret.site.com
499
500 EXTRA HEADERS
501
502   When using curl in your own very special programs, you may end up needing
503   to pass on your own custom headers when getting a web page. You can do
504   this by using the -H flag.
505
506   Example, send the header "X-you-and-me: yes" to the server when getting a
507   page:
508
509         curl -H "X-you-and-me: yes" www.love.com
510
511   This can also be useful in case you want curl to send a different text in a
512   header than it normally does. The -H header you specify then replaces the
513   header curl would normally send. If you replace an internal header with an
514   empty one, you prevent that header from being sent. To prevent the Host:
515   header from being used:
516
517         curl -H "Host:" www.server.com
518
519 FTP and PATH NAMES
520
521   Do note that when getting files with the ftp:// URL, the given path is
522   relative the directory you enter. To get the file 'README' from your home
523   directory at your ftp site, do:
524
525         curl ftp://user:passwd@my.site.com/README
526
527   But if you want the README file from the root directory of that very same
528   site, you need to specify the absolute file name:
529
530         curl ftp://user:passwd@my.site.com//README
531
532   (I.e with an extra slash in front of the file name.)
533
534 FTP and firewalls
535
536   The FTP protocol requires one of the involved parties to open a second
537   connction as soon as data is about to get transfered. There are two ways to
538   do this.
539
540   The default way for curl is to issue the PASV command which causes the
541   server to open another port and await another connection performed by the
542   client. This is good if the client is behind a firewall that don't allow
543   incoming connections.
544
545         curl ftp.download.com
546
547   If the server for example, is behind a firewall that don't allow connections
548   on other ports than 21 (or if it just doesn't support the PASV command), the
549   other way to do it is to use the PORT command and instruct the server to
550   connect to the client on the given (as parameters to the PORT command) IP
551   number and port.
552
553   The -P flag to curl supports a few different options. Your machine may have
554   several IP-addresses and/or network interfaces and curl allows you to select
555   which of them to use. Default address can also be used:
556
557         curl -P - ftp.download.com
558
559   Download with PORT but use the IP address of our 'le0' interface (this does
560   not work on windows):
561
562         curl -P le0 ftp.download.com
563
564   Download with PORT but use 192.168.0.10 as our IP address to use:
565
566         curl -P 192.168.0.10 ftp.download.com
567
568 NETWORK INTERFACE
569
570   Get a web page from a server using a specified port for the interface:
571
572         curl --interface eth0:1 http://www.netscape.com/
573
574   or
575
576         curl --interface 192.168.1.10 http://www.netscape.com/
577
578 HTTPS
579
580   Secure HTTP requires SSL libraries to be installed and used when curl is
581   built. If that is done, curl is capable of retrieving and posting documents
582   using the HTTPS procotol.
583
584   Example:
585
586         curl https://www.secure-site.com
587
588   Curl is also capable of using your personal certificates to get/post files
589   from sites that require valid certificates. The only drawback is that the
590   certificate needs to be in PEM-format. PEM is a standard and open format to
591   store certificates with, but it is not used by the most commonly used
592   browsers (Netscape and MSIE both use the so called PKCS#12 format). If you
593   want curl to use the certificates you use with your (favourite) browser, you
594   may need to download/compile a converter that can convert your browser's
595   formatted certificates to PEM formatted ones. This kind of converter is
596   included in recent versions of OpenSSL, and for older versions Dr Stephen
597   N. Henson has written a patch for SSLeay that adds this functionality. You
598   can get his patch (that requires an SSLeay installation) from his site at:
599   http://www.drh-consultancy.demon.co.uk/
600
601   Example on how to automatically retrieve a document using a certificate with
602   a personal password:
603
604         curl -E /path/to/cert.pem:password https://secure.site.com/
605
606   If you neglect to specify the password on the command line, you will be
607   prompted for the correct password before any data can be received.
608
609   Many older SSL-servers have problems with SSLv3 or TLS, that newer versions
610   of OpenSSL etc is using, therefore it is sometimes useful to specify what
611   SSL-version curl should use. Use -3, -2 or -1 to specify that exact SSL
612   version to use (for SSLv3, SSLv2 or TLSv1 respectively):
613
614         curl -2 https://secure.site.com/
615
616   Otherwise, curl will first attempt to use v3 and then v2.
617
618   To use OpenSSL to convert your favourite browser's certificate into a PEM
619   formatted one that curl can use, do something like this (assuming netscape,
620   but IE is likely to work similarly):
621
622     You start with hitting the 'security' menu button in netscape. 
623
624     Select 'certificates->yours' and then pick a certificate in the list 
625
626     Press the 'export' button 
627
628     enter your PIN code for the certs 
629
630     select a proper place to save it 
631
632     Run the 'openssl' application to convert the certificate. If you cd to the
633     openssl installation, you can do it like:
634
635      # ./apps/openssl pkcs12 -in [file you saved] -clcerts -out [PEMfile]
636
637
638 RESUMING FILE TRANSFERS
639
640  To continue a file transfer where it was previously aborted, curl supports
641  resume on http(s) downloads as well as ftp uploads and downloads.
642
643  Continue downloading a document:
644
645         curl -C - -o file ftp://ftp.server.com/path/file
646
647  Continue uploading a document(*1):
648
649         curl -C - -T file ftp://ftp.server.com/path/file
650
651  Continue downloading a document from a web server(*2):
652
653         curl -C - -o file http://www.server.com/
654
655  (*1) = This requires that the ftp server supports the non-standard command
656         SIZE. If it doesn't, curl will say so.
657
658  (*2) = This requires that the web server supports at least HTTP/1.1. If it
659         doesn't, curl will say so.
660
661 TIME CONDITIONS
662
663  HTTP allows a client to specify a time condition for the document it
664  requests. It is If-Modified-Since or If-Unmodified-Since. Curl allow you to
665  specify them with the -z/--time-cond flag.
666
667  For example, you can easily make a download that only gets performed if the
668  remote file is newer than a local copy. It would be made like:
669
670         curl -z local.html http://remote.server.com/remote.html
671
672  Or you can download a file only if the local file is newer than the remote
673  one. Do this by prepending the date string with a '-', as in:
674
675         curl -z -local.html http://remote.server.com/remote.html
676
677  You can specify a "free text" date as condition. Tell curl to only download
678  the file if it was updated since yesterday:
679
680         curl -z yesterday http://remote.server.com/remote.html
681
682  Curl will then accept a wide range of date formats. You always make the date
683  check the other way around by prepending it with a dash '-'.
684
685 DICT
686
687   For fun try
688
689         curl dict://dict.org/m:curl
690         curl dict://dict.org/d:heisenbug:jargon
691         curl dict://dict.org/d:daniel:web1913
692
693   Aliases for 'm' are 'match' and 'find', and aliases for 'd' are 'define'
694   and 'lookup'. For example,
695
696         curl dict://dict.org/find:curl
697
698   Commands that break the URL description of the RFC (but not the DICT
699   protocol) are
700
701         curl dict://dict.org/show:db
702         curl dict://dict.org/show:strat
703
704   Authentication is still missing (but this is not required by the RFC)
705
706 LDAP
707
708   If you have installed the OpenLDAP library, curl can take advantage of it
709   and offer ldap:// support.
710
711   LDAP is a complex thing and writing an LDAP query is not an easy task. I do
712   advice you to dig up the syntax description for that elsewhere. Two places
713   that might suit you are:
714
715   Netscape's "Netscape Directory SDK 3.0 for C Programmer's Guide Chapter 10:
716   Working with LDAP URLs":
717   http://developer.netscape.com/docs/manuals/dirsdk/csdk30/url.htm
718
719   RFC 2255, "The LDAP URL Format" http://www.rfc-editor.org/rfc/rfc2255.txt
720
721   To show you an example, this is now I can get all people from my local LDAP
722   server that has a certain sub-domain in their email address:
723
724         curl -B "ldap://ldap.frontec.se/o=frontec??sub?mail=*sth.frontec.se"
725
726   If I want the same info in HTML format, I can get it by not using the -B
727   (enforce ASCII) flag.
728
729 ENVIRONMENT VARIABLES
730
731   Curl reads and understands the following environment variables:
732
733         http_proxy, HTTPS_PROXY, FTP_PROXY, GOPHER_PROXY
734
735   They should be set for protocol-specific proxies. General proxy should be
736   set with
737         
738         ALL_PROXY
739
740   A comma-separated list of host names that shouldn't go through any proxy is
741   set in (only an asterisk, '*' matches all hosts)
742
743         NO_PROXY
744
745   If a tail substring of the domain-path for a host matches one of these
746   strings, transactions with that node will not be proxied.
747
748
749   The usage of the -x/--proxy flag overrides the environment variables.
750
751 NETRC
752
753   Unix introduced the .netrc concept a long time ago. It is a way for a user
754   to specify name and password for commonly visited ftp sites in a file so
755   that you don't have to type them in each time you visit those sites. You
756   realize this is a big security risk if someone else gets hold of your
757   passwords, so therefor most unix programs won't read this file unless it is
758   only readable by yourself (curl doesn't care though).
759
760   Curl supports .netrc files if told so (using the -n/--netrc and
761   --netrc-optional options). This is not restricted to only ftp,
762   but curl can use it for all protocols where authentication is used.
763
764   A very simple .netrc file could look something like:
765
766         machine curl.haxx.se login iamdaniel password mysecret
767
768 CUSTOM OUTPUT
769
770   To better allow script programmers to get to know about the progress of
771   curl, the -w/--write-out option was introduced. Using this, you can specify
772   what information from the previous transfer you want to extract.
773
774   To display the amount of bytes downloaded together with some text and an
775   ending newline:
776
777         curl -w 'We downloaded %{size_download} bytes\n' www.download.com
778
779 KERBEROS4 FTP TRANSFER
780
781   Curl supports kerberos4 for FTP transfers. You need the kerberos package
782   installed and used at curl build time for it to be used.
783
784   First, get the krb-ticket the normal way, like with the kauth tool. Then use
785   curl in way similar to:
786
787         curl --krb4 private ftp://krb4site.com -u username:fakepwd
788
789   There's no use for a password on the -u switch, but a blank one will make
790   curl ask for one and you already entered the real password to kauth.
791
792 TELNET
793
794   The curl telnet support is basic and very easy to use. Curl passes all data
795   passed to it on stdin to the remote server. Connect to a remote telnet
796   server using a command line similar to:
797
798         curl telnet://remote.server.com
799
800   And enter the data to pass to the server on stdin. The result will be sent
801   to stdout or to the file you specify with -o.
802
803   You might want the -N/--no-buffer option to switch off the buffered output
804   for slow connections or similar.
805
806   Pass options to the telnet protocol negotiation, by using the -t option. To
807   tell the server we use a vt100 terminal, try something like:
808
809         curl -tTTYPE=vt100 telnet://remote.server.com
810
811   Other interesting options for it -t include:
812
813    - XDISPLOC=<X display> Sets the X display location.
814
815    - NEW_ENV=<var,val> Sets an environment variable.
816
817   NOTE: the telnet protocol does not specify any way to login with a specified
818   user and password so curl can't do that automatically. To do that, you need
819   to track when the login prompt is received and send the username and
820   password accordingly.
821
822 PERSISTANT CONNECTIONS
823
824   Specifying multiple files on a single command line will make curl transfer
825   all of them, one after the other in the specified order.
826
827   libcurl will attempt to use persistant connections for the transfers so that
828   the second transfer to the same host can use the same connection that was
829   already initiated and was left open in the previous transfer. This greatly
830   decreases connection time for all but the first transfer and it makes a far
831   better use of the network.
832
833   Note that curl cannot use persistant connections for transfers that are used
834   in subsequence curl invokes. Try to stuff as many URLs as possible on the
835   same command line if they are using the same host, as that'll make the
836   transfers faster. If you use a http proxy for file transfers, practicly
837   all transfers will be persistant.
838
839 MAILING LISTS
840
841   For your convenience, we have several open mailing lists to discuss curl,
842   its development and things relevant to this. Get all info at
843   http://curl.haxx.se/mail/. The lists available are:
844
845   curl-users
846
847     Users of the command line tool. How to use it, what doesn't work, new
848     features, related tools, questions, news, installations, compilations,
849     running, porting etc.
850
851   curl-library
852
853     Developers using or developing libcurl. Bugs, extensions, improvements.
854
855   curl-announce
856
857     Low-traffic. Only announcements of new public versions.
858
859   curl-and-PHP
860
861     Using the curl functions in PHP. Everything curl with a PHP angle. Or PHP
862     with a curl angle.
863
864   curl-commits
865
866     Receives notifications on all CVS commits done to the curl source module.
867     This can become quite a large amount of mails during intense development,
868     be aware. This is for us who like email...
869
870   curl-www-commits
871
872     Receives notifications on all CVS commits done to the curl www module
873     (basicly the web site).  This can become quite a large amount of mails
874     during intense changing, be aware. This is for us who like email...
875
876   Please direct curl questions, feature requests and trouble reports to one of
877   these mailing lists instead of mailing any individual.