I want to post data to the url using basic authentication as per RFC2617
$header = base64_encode("[email protected]:india123");
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: text/plain', 'Authorization: Basic '.$header));
What else I need to do here, I am passing ':' separated username and password using base64 encoding?
I am getting 401 response, that is unauthorized where as my username and password are valid, I am able to login using them.
Thanks