PHP code example of rayful / image-proxy

1. Go to this page and download the library: Download rayful/image-proxy library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

rayful / image-proxy example snippets


$root = "http://hk.xyh.io/image";
$secret = "secret";
$image = "http://images.neimanmarcus.com/ca/1/product_assets/X/3/P/3/4/NMX3P34_mk.jpg";

$ImageProxyURLGenerator = new \rayful\Tool\ImageProxyURLGenerator($root, $secret);
$URL = $ImageProxyURLGenerator->build($image, 1000, 1000);