11

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
  • 68,918
  • 10
  • 117
  • 136
Magic Lasso
  • 1,456
  • 3
  • 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

18

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

Jean-François Fabre
  • 131,796
  • 23
  • 122
  • 195
Barmar
  • 669,327
  • 51
  • 454
  • 560
  • 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