According to cURL documentation http://curl.haxx.se/docs/manpage.html
-v, --verbose
Makes the fetching more verbose/talkative.
But I came across
curl -vvv -u [email protected]:password http://www.example.com
What is the difference between -v
and -vvv
?
To make an OPTIONS request with Curl, you must pass the -X OPTIONS command-line parameter to the Curl request. Browsers send OPTIONS requests when making a CORS request to another origin. The OPTIONS request does not return any data. All information is returned in the response headers.
The option tells curl to skip the verification of the server's TLS certificate – it will skip the cryptographic certificate verification (that it was signed by a trusted CA) and it will skip other certificate checks, like that it was made for the host name curl connects to and that it hasn't expired etc.
The -H in curl indicates the headers of the request, so your curl will translate to php like: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://thewebsite.com"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HTTPGET, 1); curl_setopt($ch, CURLOPT_USERPWD, "app:app"); $headers = [ "Content- ...
tl;dr: there is no difference between -v
and -vvv
.
Specifying -v multiple times usually means to increase verbosity accordingly.
This is true, e.g for a software like memcached:
-v verbose (print errors/warnings while in event loop)
-vv very verbose (also print client commands/reponses)
-vvv extremely verbose (also print internal state transitions)
(behind the scenes the options parser accumulates the level of verbosity).
But with curl command-line tool this is not the case. As you can see from tool_getparam.c, passing -v
simply toggles the so-called trace type to TRACE_PLAIN
. Passing -vv
or -vvv
does the same.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With