Skip to content

Instantly share code, notes, and snippets.

@allen501pc
Created May 5, 2012 07:52
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 allen501pc/2600765 to your computer and use it in GitHub Desktop.
Save allen501pc/2600765 to your computer and use it in GitHub Desktop.
Show the encrypted url picture.
<?php
$EncUrl = ImageURLEncryption("http://l.yimg.com/f/i/tw/hp/mh/09purple.gif","picture");
/* 例如我要隱藏上面的圖片URL,透過Mask = "picture",來加密,因此$EncUrl輸出結果為
aEB0RjpML1guTmkMZxdjDG0WZhtpFnQUL1BwHG1bLwA5RHVEcA9lGmdeZg==
*/
/* 以下藉由demo_picture.php 來展示圖檔 */
$Type = @$_GET['type'];
$ResourceID = @$_GET['resource_id'];
header('Content-Type: image/png');
print file_get_contents(ImageURLDecryption($ResourceID,$Type));
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment