12

The reference I have lists an option as:

curl -u 'ExactID:Password'\

Does this mean for me to just use CURLOPT_USERPWD and use the format ExactID:Password?

Marcin Orlowski
  • 72,056
  • 11
  • 123
  • 141
Magic Lasso
  • 1,504
  • 5
  • 22
  • 29
  • So now is this related to the PHP libcurl binding or cURL's CLI? –  Sep 13 '12 at 20:40
  • Duplicate: http://stackoverflow.com/questions/2140419/how-do-i-make-a-request-using-http-basic-authentication-with-php-curl – mishmash Sep 13 '12 at 20:41

1 Answers1

21

Yes, the CLI -u option is equivalent to the PHP CURLOPT_USERPWD option, and the value is the same.

Jean-François Fabre
  • 137,073
  • 23
  • 153
  • 219
Barmar
  • 741,623
  • 53
  • 500
  • 612
  • Any idea how use [CURLOPT_USERPWD and CURLOPT_PROXY on the same request](https://stackoverflow.com/questions/65745669/stripe-api-php-curl-request-behind-a-proxy)? – Pedro Lobito Jan 16 '21 at 01:40