note 85485 modified in features.http-auth by felipe

From: Date: Tue, 02 Sep 2008 11:21:28 +0000
Subject: note 85485 modified in features.http-auth by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-144073@lists.php.net to get a copy of this message
please remove my other posting, it was just a quickfix. here is a real solution for both auth-digest-example and the contribution of AlexTM, witch does not work with Internet Explorer: <?php function http_digest_parse($digest) { # edit needed parts, as you want preg_match_all('@(username|nonce|uri|nc|cnonce|qop|response)'. '=[\'"]?([^\'",]+)@', $digest, $t); $data = array_combine($t[1], $t[2]); # all parts found? return (count($data)==7) ? $data : false; } ?> --was-- please remove my other posting, it was just a quickfix. here is a real solution for both auth-digest-example and the contribution of AlexTM, witch does not work with Internet Explorer: <? function http_digest_parse($digest) { # edit needed parts, as you want preg_match_all('@(username|nonce|uri|nc|cnonce|qop|response)'. '=[\'"]?([^\'",]+)@', $digest, $t); $data = array_combine($t[1], $t[2]); # all parts found? return (count($data)==7) ? $data : false; } ?> http://php.net/manual/en/features.http-auth.php

« previous php.notes (#144073) next »