HttpSecureLinkModule Q?

António P. P. Almeida appa at perusio.net
Wed Dec 22 06:11:55 MSK 2010


On 22 Dez 2010 02h25 WET, nbubingo at gmail.com wrote:

> izrodix at 2010-12-21 19:28 wrote:
>> Weibin Yao, 
>> it's working but may be I'm doing something wrong.
>> Here is what I do.
>>
>> $uri_hash = md5('your_secret_word'.'/subdir1/subdir2/movie.flv',true); 
                                                                   ^^^^
This is incorrect. You need the string not the raw binary format.

>> $uri_ehash = base64_encode($uri_hash);

Use this instead:

$uri_hash = md5('your_secret_word' . '/subdir1/subdir2/movie.flv');
$uri_ehash = str_replace('=', '', strtr(base64_encode($uri_hash), '+/', '-_')));

--- appa




More information about the nginx mailing list