mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
updates by SM nttp at iname.com
This commit is contained in:
parent
02f6894af5
commit
bc5954fe2d
9
docs/FAQ
9
docs/FAQ
@ -84,10 +84,11 @@ FAQ
|
|||||||
|
|
||||||
1.2 What is libcurl?
|
1.2 What is libcurl?
|
||||||
|
|
||||||
libcurl is a reliable, higly portable multiprotocol file transfer library.
|
libcurl is a reliable and portable library which provides you with an easy
|
||||||
|
interface to a range of common internet protocols.
|
||||||
|
|
||||||
Any application is free to use libcurl, even commercial or closed-source
|
You can use libcurl for free in your application even if it is commercial
|
||||||
ones.
|
or closed-source.
|
||||||
|
|
||||||
1.3 What is cURL not?
|
1.3 What is cURL not?
|
||||||
|
|
||||||
@ -499,7 +500,7 @@ FAQ
|
|||||||
available way to do multiple requests was to init/perform/cleanup for each
|
available way to do multiple requests was to init/perform/cleanup for each
|
||||||
transfer.
|
transfer.
|
||||||
|
|
||||||
5.4 Does libcurl do Winsock initing on win32 systems?
|
5.4 Does libcurl do Winsock initialization on win32 systems?
|
||||||
|
|
||||||
No.
|
No.
|
||||||
|
|
||||||
|
10
docs/INSTALL
10
docs/INSTALL
@ -7,7 +7,7 @@
|
|||||||
How To Compile
|
How To Compile
|
||||||
|
|
||||||
Curl has been compiled and built on numerous different operating systems. The
|
Curl has been compiled and built on numerous different operating systems. The
|
||||||
way to proceed is mainly divided in two different ways: the unix way or the
|
way to proceed is mainly divided in two different ways: the unix way or the
|
||||||
windows way.
|
windows way.
|
||||||
|
|
||||||
If you're using Windows (95/98/NT/ME/2000 or whatever) or OS/2, you should
|
If you're using Windows (95/98/NT/ME/2000 or whatever) or OS/2, you should
|
||||||
@ -183,9 +183,9 @@ Win32
|
|||||||
For VC++ 6, there's an included Makefile.vc6 that should be possible
|
For VC++ 6, there's an included Makefile.vc6 that should be possible
|
||||||
to use out-of-the-box.
|
to use out-of-the-box.
|
||||||
|
|
||||||
Microsoft note: add /Zm200 to the compiler options, as the hugehelp.c
|
Microsoft note: add /Zm200 to the compiler options to increase the
|
||||||
won't compile otherwise due to "too long puts string" or something
|
compiler's memory allocation limit, as the hugehelp.c won't compile
|
||||||
like that!
|
due to "too long puts string".
|
||||||
|
|
||||||
|
|
||||||
With SSL:
|
With SSL:
|
||||||
@ -251,7 +251,7 @@ IBM OS/2
|
|||||||
|
|
||||||
PORTS
|
PORTS
|
||||||
=====
|
=====
|
||||||
Just to show off, this is a probably incomplete list of known hardware and
|
This is a probably incomplete list of known hardware and
|
||||||
operating systems that curl has been compiled for:
|
operating systems that curl has been compiled for:
|
||||||
|
|
||||||
- Ultrix
|
- Ultrix
|
||||||
|
60
docs/MANUAL
60
docs/MANUAL
@ -15,10 +15,6 @@ SIMPLE USAGE
|
|||||||
|
|
||||||
curl ftp://ftp.funet.fi/README
|
curl ftp://ftp.funet.fi/README
|
||||||
|
|
||||||
Get a gopher document from funet's gopher server:
|
|
||||||
|
|
||||||
curl gopher://gopher.funet.fi
|
|
||||||
|
|
||||||
Get a web page from a server using port 8000:
|
Get a web page from a server using port 8000:
|
||||||
|
|
||||||
curl http://www.weirdserver.com:8000/
|
curl http://www.weirdserver.com:8000/
|
||||||
@ -27,6 +23,10 @@ SIMPLE USAGE
|
|||||||
|
|
||||||
curl ftp://cool.haxx.se/
|
curl ftp://cool.haxx.se/
|
||||||
|
|
||||||
|
Get a gopher document from funet's gopher server:
|
||||||
|
|
||||||
|
curl gopher://gopher.funet.fi
|
||||||
|
|
||||||
Get the definition of curl from a dictionary:
|
Get the definition of curl from a dictionary:
|
||||||
|
|
||||||
curl dict://dict.org/m:curl
|
curl dict://dict.org/m:curl
|
||||||
@ -186,7 +186,7 @@ DETAILED INFORMATION
|
|||||||
-D/--dump-header option when getting files from both FTP and HTTP, and it
|
-D/--dump-header option when getting files from both FTP and HTTP, and it
|
||||||
will then store the headers in the specified file.
|
will then store the headers in the specified file.
|
||||||
|
|
||||||
Store the HTTP headers in a separate file:
|
Store the HTTP headers in a separate file (headers.txt in the example):
|
||||||
|
|
||||||
curl --dump-header headers.txt curl.haxx.se
|
curl --dump-header headers.txt curl.haxx.se
|
||||||
|
|
||||||
@ -245,32 +245,32 @@ POST (HTTP)
|
|||||||
|
|
||||||
-F accepts parameters like -F "name=contents". If you want the contents to
|
-F accepts parameters like -F "name=contents". If you want the contents to
|
||||||
be read from a file, use <@filename> as contents. When specifying a file,
|
be read from a file, use <@filename> as contents. When specifying a file,
|
||||||
you can also specify which content type the file is, by appending
|
you can also specify the file content type by appending ';type=<mime type>'
|
||||||
';type=<mime type>' to the file name. You can also post contents of several
|
to the file name. You can also post the contents of several files in one field.
|
||||||
files in one field. So that the field name 'coolfiles' can be sent three
|
For example, the field name 'coolfiles' is used to send three files, with
|
||||||
files with different content types in a manner similar to:
|
different content types using the following syntax:
|
||||||
|
|
||||||
curl -F "coolfiles=@fil1.gif;type=image/gif,fil2.txt,fil3.html" \
|
curl -F "coolfiles=@fil1.gif;type=image/gif,fil2.txt,fil3.html" \
|
||||||
http://www.post.com/postit.cgi
|
http://www.post.com/postit.cgi
|
||||||
|
|
||||||
If content-type is not specified, curl will try to guess from the extension
|
If the content-type is not specified, curl will try to guess from the file
|
||||||
(it only knows a few), or use the previously specified type (from an earlier
|
extension (it only knows a few), or use the previously specified type
|
||||||
file if several files are specified in a list) or finally using the default
|
(from an earlier file if several files are specified in a list) or else it
|
||||||
type 'text/plain'.
|
will using the default type 'text/plain'.
|
||||||
|
|
||||||
Emulate a fill-in form with -F. Let's say you fill in three fields in a
|
Emulate a fill-in form with -F. Let's say you fill in three fields in a
|
||||||
form. One field is a file name which to post, one field is your name and one
|
form. One field is a file name which to post, one field is your name and one
|
||||||
field is a file description. We want to post the file we have written named
|
field is a file description. We want to post the file we have written named
|
||||||
"cooltext.txt". To let curl do the posting of this data instead of your
|
"cooltext.txt". To let curl do the posting of this data instead of your
|
||||||
favourite browser, you have to check out the HTML of the form page to get to
|
favourite browser, you have to read the HTML source of the form page and find
|
||||||
know the names of the input fields. In our example, the input field names are
|
the names of the input fields. In our example, the input field names are
|
||||||
'file', 'yourname' and 'filedescription'.
|
'file', 'yourname' and 'filedescription'.
|
||||||
|
|
||||||
curl -F "file=@cooltext.txt" -F "yourname=Daniel" \
|
curl -F "file=@cooltext.txt" -F "yourname=Daniel" \
|
||||||
-F "filedescription=Cool text file with cool text inside" \
|
-F "filedescription=Cool text file with cool text inside" \
|
||||||
http://www.post.com/postit.cgi
|
http://www.post.com/postit.cgi
|
||||||
|
|
||||||
So, to send two files in one post you can do it in two ways:
|
To send two files in one post you can do it in two ways:
|
||||||
|
|
||||||
1. Send multiple files in a single "field" with a single field name:
|
1. Send multiple files in a single "field" with a single field name:
|
||||||
|
|
||||||
@ -280,11 +280,11 @@ POST (HTTP)
|
|||||||
|
|
||||||
curl -F "docpicture=@dog.gif" -F "catpicture=@cat.gif"
|
curl -F "docpicture=@dog.gif" -F "catpicture=@cat.gif"
|
||||||
|
|
||||||
REFERER
|
REFERRER
|
||||||
|
|
||||||
A HTTP request has the option to include information about which address
|
A HTTP request has the option to include information about which address
|
||||||
that referred to actual page, and curl allows the user to specify that
|
that referred to actual page. Curl allows you to specify the
|
||||||
referrer to get specified on the command line. It is especially useful to
|
referrer to be used on the command line. It is especially useful to
|
||||||
fool or trick stupid servers or CGI scripts that rely on that information
|
fool or trick stupid servers or CGI scripts that rely on that information
|
||||||
being available or contain certain data.
|
being available or contain certain data.
|
||||||
|
|
||||||
@ -353,13 +353,17 @@ COOKIES
|
|||||||
Note that by specifying -b you enable the "cookie awareness" and with -L
|
Note that by specifying -b you enable the "cookie awareness" and with -L
|
||||||
you can make curl follow a location: (which often is used in combination
|
you can make curl follow a location: (which often is used in combination
|
||||||
with cookies). So that if a site sends cookies and a location, you can
|
with cookies). So that if a site sends cookies and a location, you can
|
||||||
use a non-existing file to trig the cookie awareness like:
|
use a non-existing file to trigger the cookie awareness like:
|
||||||
|
|
||||||
curl -L -b empty-file www.example.com
|
curl -L -b empty.txt www.example.com
|
||||||
|
|
||||||
The file to read cookies from must be formatted using plain HTTP headers OR
|
The file to read cookies from must be formatted using plain HTTP headers OR
|
||||||
as netscape's cookie file. Curl will determine what kind it is based on the
|
as netscape's cookie file. Curl will determine what kind it is based on the
|
||||||
file contents.
|
file contents. In the above command, curl will parse the header and store
|
||||||
|
the cookies received from www.example.com. curl will send to the server the
|
||||||
|
stored cookies which match the request as it follows the location. The
|
||||||
|
file "empty.txt" may be a non-existant file.
|
||||||
|
|
||||||
|
|
||||||
PROGRESS METER
|
PROGRESS METER
|
||||||
|
|
||||||
@ -392,12 +396,12 @@ PROGRESS METER
|
|||||||
|
|
||||||
SPEED LIMIT
|
SPEED LIMIT
|
||||||
|
|
||||||
Curl offers the user to set conditions regarding transfer speed that must
|
Curl allows the user to set the transfer speed conditions that must be met
|
||||||
be met to let the transfer keep going. By using the switch -y and -Y you
|
to let the transfer keep going. By using the switch -y and -Y you
|
||||||
can make curl abort transfers if the transfer speed doesn't exceed your
|
can make curl abort transfers if the transfer speed is below the specified
|
||||||
given lowest limit for a specified time.
|
lowest limit for a specified time.
|
||||||
|
|
||||||
To let curl abandon downloading this page if its slower than 3000 bytes per
|
To have curl abort the download if the speed is slower than 3000 bytes per
|
||||||
second for 1 minute, run:
|
second for 1 minute, run:
|
||||||
|
|
||||||
curl -y 3000 -Y 60 www.far-away-site.com
|
curl -y 3000 -Y 60 www.far-away-site.com
|
||||||
@ -610,7 +614,7 @@ RESUMING FILE TRANSFERS
|
|||||||
(*1) = This requires that the ftp server supports the non-standard command
|
(*1) = This requires that the ftp server supports the non-standard command
|
||||||
SIZE. If it doesn't, curl will say so.
|
SIZE. If it doesn't, curl will say so.
|
||||||
|
|
||||||
(*2) = This requires that the wb server supports at least HTTP/1.1. If it
|
(*2) = This requires that the web server supports at least HTTP/1.1. If it
|
||||||
doesn't, curl will say so.
|
doesn't, curl will say so.
|
||||||
|
|
||||||
TIME CONDITIONS
|
TIME CONDITIONS
|
||||||
|
Loading…
Reference in New Issue
Block a user