PHP code example of jleagle / imagga-api-client

1. Go to this page and download the library: Download jleagle/imagga-api-client 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/ */

    

jleagle / imagga-api-client example snippets


$imagga = new Imagga(
  $apiKey,
  $apiSecret
);

// Most methods can take an array of either URLs or content IDs.
$images = [
  'http://playground.imagga.com/static/img/example_photo.jpg',
  'http://playground.imagga.com/static/img/example_photos/japan-605234_1280.jpg'
];

// Gets image tags
$tags = $imagga->tags($images);

// Get your current API usage levels
$usage = $imagga->usage();

// Get the colors of an image
$colors = $imagga->colors($images);