Skip to content

Instantly share code, notes, and snippets.

@lildude
Last active August 29, 2015 14:02
Show Gist options
  • Save lildude/00f8f00cc9bdc3163c83 to your computer and use it in GitHub Desktop.
Save lildude/00f8f00cc9bdc3163c83 to your computer and use it in GitHub Desktop.
Simple illustration for using phpSmug's signResource()
<?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