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 | |
/** | |
* Returns a pre-signed URL to access a restricted AWS S3 object. | |
* | |
* @param string $access_key the AWS access key | |
* @param string $secret_key the AWS secret key associated with the access key | |
* @param string $bucket the S3 bucket | |
* @param string $canonical_uri the object in the S3 bucket expressed as a canonical URI. | |
* This should begin with the / character, and should not be URL-encoded | |
* @param int $expires the time that the pre-signed URL will expire, in seconds |