-
-
Save lildude/00f8f00cc9bdc3163c83 to your computer and use it in GitHub Desktop.
Simple illustration for using phpSmug's signResource()
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 | |
require_once("phpSmug.php"); | |
$f = new phpSmug("APIKey=[APKIKEY]", "OAuthSecret=[SECRET]", "AppName=Developing phpSmug Wrapper/PHPUnit Testing", "APIVer=1.3.0"); | |
$f->setToken('id=TOKEN', 'Secret=SECRET'); | |
$d = $f->images_getURLs("ImageID=1385923576", "ImageKey=XbGbzgG"); | |
$i = $f->signResource( $d['TinyURL'] ); | |
?> | |
<html><head><title>Demo Signed URL</title></head> | |
<body> | |
<?php echo "<img src='{$d['TinyURL']}' />"; ?> | |
<?php echo "<img src='{$i}' />"; ?> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment