PHP code example of shitric / cloudflare-images

1. Go to this page and download the library: Download shitric/cloudflare-images 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/ */

    

shitric / cloudflare-images example snippets


$cloudFlareImages = new Images('Account_ID', 'API_Token', 'Images_Hash', 'Domain');

$imageId = $cloudFlareImages->uploadImageFile('File_Path', 'File_Name', false, ['key'=>'value'], 'Custom_ID');

$cloudFlareImages->getImageUrl('Image_ID', 'Variant');

$cloudFlareImages->deleteImage('Image_ID');