How To Make A Request Using Digest Authentication with PHP


PHP Code
#!/usr/local/bin/php
<?php
$hCurl = curl_init();
curl_setopt($hCurl, CURLOPT_URL, 'http://example.com/myapp.php');
curl_setopt($hCurl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($hCurl, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
curl_setopt($hCurl, CURLOPT_USERPWD, 'myusername:mypass');

$data = curl_exec($hCurl);
curl_close($hCurl);
?>
 


The Captian
Today they call you "crazy". Tomorrow they call you "ahead of your time."
Global Skywatch Learn about Chemtrails - You're breathing them now!
OnlyTheBestHerbs.com World-class supplements
Mercury Talk Why you are sick.
OneUp Domains Domains, Hosting, Email
1-800-358-4278 (U.S. & Canada)