Http Digest Authentication

liunx

Guest
Does anyone know how to connect to a server using HTTP Digest Authentication using PHP and without using Curl? The version of Curl currently installed on the server I am on (server 39) is 7.10.5, and HTTP Digest Authentication was not added to Curl until version 7.10.6, and the latest version is 7.10.8. I'm not sure if there are any planned upgrades to the servers anytime soon, but I need to be able to do this asap. Some help would be appreciated. Thanks!<br /><br />Jeff Kieke<!--content-->
Don't know if there's a way to work around this, might have to wait it out. Maybe we can get some suggestions on some alternative scripts that would do the same thing as you need done? <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><!--content-->
Looks like I'll have to wait it out. I've been searching around for ways to do this without curl and I'm coming up totally empty. The only things I've found are scripts like this: <a href="http://www.xiven.com/sourcecode/digestauthentication" target="_blank">http://www.xiven.com/sourcecode/digestauthentication</a><br /><br />But that is something that goes on the server I am connecting to, not the other way around.<br /><br />FWIW, this is the code I am using:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><?<br />$url = "http://some.url.com";<br />$ch = curl_init();<br />curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);<br />curl_setopt($ch, CURLOPT_URL, $url);<br />curl_setopt($ch, CURLOPT_USERPWD, "username:password");<br />$result = curl_exec($ch);<br />curl_close($ch);<br />echo $result;<br />?><!--c2--></div><!--ec2--><br /><br />I've also tried using the following, but this is what requires the newer version of Curl:<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><?<br />$return = `/usr/bin/curl -u username:password http://some.url.com --digest`;<br />echo $return;<br />?><!--c2--></div><!--ec2--><br /><br />I just can't seem to find anything using PHP that doesn't require Curl. The company I am trying to connect to has never had anyone use PHP to connect before. They have examples using Java, but I know nothing about Java or if it's installed on the server or anything.<!--content-->
 
Back
Top