PHP code example of imageseo / imageseo-php

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

    

imageseo / imageseo-php example snippets






use ImageSeo\Client\Client;

$apiKey = "YOUR_API_KEY";
$client =new Client($apiKey);



use ImageSeo\Client\Client;

$apiKey = "YOUR_API_KEY";
$client =new Client($apiKey);

$data = [
    "src": "https://example.com/image.jpg"
];
$report = $client->getResource('ImageReports')->generateReportFromUrl($data);



use ImageSeo\Client\Client;

$apiKey = "YOUR_API_KEY";
$client =new Client($apiKey);

$data = [
    "filePath": "/path/your/image.jpg"
];
$report = $client->getResource('ImageReports')->generateReportFromFile($data);



use ImageSeo\Client\Client;

$apiKey = "YOUR_API_KEY";
$client =new Client($apiKey);

$report = $client->getResource('Languages')->getLanguages();
bash
composer