Skip to content

Instantly share code, notes, and snippets.

@funkatron
funkatron / http_digest_example.php
Created April 30, 2011 20:08
An example of how to manually construct an HTTP Digest authentication header.
<?php
$url = 'http://domain.foo';
$uri = '/assets';
$username = 'testyser';
$password = 'somepassword';
$method = 'GET';
$ht = new HttpRequest($url.$uri, HttpRequest::METH_GET);
$ht->send();