Welcome! Log In Create A New Profile

Advanced

Re: nginx-0.8.50

September 08, 2010 05:31AM
Спасибо, разобрался...

Вот пример на PHP..

[code]
$secret_word = "PASSWORD"; // Секретное слово ;)
$uri_prefix = "http://test/p/"; // Начало ссылки
$file = '/file.zip'; // Файл
$time = time()+43200; // Ссылка будет действительна в течении 12 часов
$secret = md5($time.'.'.$file.'.'.$secret_word, true); // Хешируем в md5 bin.
$secret = strtr(base64_encode($secret), '+/', '-_'); // Encode base64 url

$hash_url = $uri_prefix.$secret.','.$time.$file; // Формируем ссылку

echo $hash_url; // http://test/p/2NQsU9GwkRczHLAoVIR90g==,1283988278/file.zip
[/code]
Subject Author Posted

nginx-0.8.50

Igor Sysoev September 02, 2010 11:04AM

Re: nginx-0.8.50

Alex Vorona September 02, 2010 11:28AM

Re: nginx-0.8.50

Igor Sysoev September 02, 2010 11:54AM

Re: nginx-0.8.50

Alex Aster September 05, 2010 11:10AM

Re: nginx-0.8.50

Igor Sysoev September 06, 2010 07:10AM

Re[2]: nginx-0.8.50

Михаил Монашёв September 06, 2010 03:42AM

Re: nginx-0.8.50

Marko Kevac September 03, 2010 07:56AM

Re: nginx-0.8.50

Igor Sysoev September 03, 2010 08:04AM

Re: nginx-0.8.50

codenet September 08, 2010 03:17AM

Re: nginx-0.8.50

Igor Sysoev September 08, 2010 03:30AM

Re: nginx-0.8.50

codenet September 08, 2010 04:31AM

Re: nginx-0.8.50

Igor Sysoev September 08, 2010 05:08AM

Re: nginx-0.8.50

codenet September 08, 2010 05:31AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 96
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready