How do I make a request using HTTP basic authentication with PHP curl?

I’m building a REST web service client in PHP and at the moment I’m using curl to make requests to the service.

How do I use curl to make authenticated (http basic) requests? Do I have to add the headers myself?

11 Answers
11

Leave a Comment