Created
August 20, 2010 22:23
-
-
Save ryantenney/541325 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// helper func for Cherokee webserver's hidden downloads module | |
function secure_download ($prefix, $url, $secret) { | |
$time = sprintf('%08x', time()); | |
return "$prefix/".md5($secret.$url.$time)."/$time$url"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment