I want to send data to url using basic authentication in accordance with RFC2617
$header = base64_encode("testindia01@test.com:india123");
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: text/plain', 'Authorization: Basic '.$header));
What else do I need to do here, I pass ': shared username and password using base64 encoding?
I get a 401 response , which is unauthorized, where, when my username and password are valid, I can log in using them.
thank
source
share