Skip to content

Instantly share code, notes, and snippets.

@330132662
Created February 26, 2022 08:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 330132662/ce56728c378993eb468372f6f473eabd to your computer and use it in GitHub Desktop.
Save 330132662/ce56728c378993eb468372f6f473eabd to your computer and use it in GitHub Desktop.
又拍云云存储访问控制token生成 PHP版
$host = "http://ossupyun.****.com";
$uri = '/androidtest/aaeb09fc85c7e3d4fb5c874efc48393e.jpg';
$secret = '替换成你自己的token';
$time = time() + 3600 * 24;
$light = $secret . "&" . $time . "&" . $uri;
$sign = md5($light);
$sign8 = substr($sign, 12, 8);
echo $host . $uri . "?_upt=" . $sign8 . $time;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment