Invision Power Services, Inc. * @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc. * @license http://www.invisionpower.com/legal/standards/ * @package IPS Social Suite * @since 29 Jun 2015 * @version SVN_VERSION_NUMBER */ require_once str_replace( 'applications/core/interface/imageproxy/imageproxy.php', '', str_replace( '\\', '/', __FILE__ ) ) . 'init.php'; $image = urldecode( \IPS\Request::i()->img ); if ( \IPS\Request::i()->key != hash_hmac( "sha256", $image, md5( \IPS\Settings::i()->sql_pass . \IPS\Settings::i()->board_url . \IPS\Settings::i()->sql_database ) ) ) { \IPS\Output::i()->sendOutput( NULL, 500 ); } $output = ( string ) \IPS\Http\Url::external( $image )->request()->get(); try { \IPS\Image::create( $output ); } catch ( \Exception $e ) { \IPS\Output::i()->sendOutput( NULL, 500 ); } \IPS\Output::i()->sendOutput( $output, 200, 'image' );