title: HTTP Digest authenticating in PHP
body: <p>I want to authenticate to another site using HTTP Digest authorization in PHP script.</p>
  
  <p>My function has as parameter just content of the <strong>WWW-Authenticate</strong> header and I want to generate correct response (<strong>Authorization</strong> header). I have found many examples that explain how to implement this the other way (browser authenticate to my script) but not this way. I am missing function that is able to parse WWW-Authenticate header content a generate response. Is there some standard function or common library that implements this?</p>