0

I'm trying to translate a cURL string which includes the line:

-u <account>:<token>

...but I'm not sure what that maps to in PHP's cURL API.

I've read this, but that's for Node. Can anyone enlighten me?

  • If you stick your whole curl command in this converter: https://incarnate.github.io/curl-to-php/ does that help? I expect it will come out with something along the lines of `curl_setopt($ch, CURLOPT_USERPWD, '' . ':' . '');` – ADyson Jul 06 '22 at 12:10
  • Does this answer your question? [How do I make a request using HTTP basic authentication with PHP curl?](https://stackoverflow.com/questions/2140419/how-do-i-make-a-request-using-http-basic-authentication-with-php-curl) – ADyson Jul 06 '22 at 12:15

0 Answers0