Comment on page
PHP
https://github.com/ImageSEO/imageseo-php
- PHP version 5.6 and later
composer require imageseo/imageseo-php
require_once __DIR__. '/vendor/autoload.php';
<?php
use ImageSeo\Client\Client;
$apiKey = "YOUR_API_KEY";
$client =new Client($apiKey);
Our SDK operates on the principle of resources. You must choose the resource on which you want to make an API call in order to use different methods. See the list of our resources
Example : Generate an image report from URL
<?php
use ImageSeo\Client\Client;
$apiKey = "YOUR_API_KEY";
$client =new Client($apiKey);
$data = [
"url": "https://example.com/image.jpg"
];
$report = $client->getResource('ImageReports')->generateReportFromUrl($data);
Example : Generate an image report from file
<?php
use ImageSeo\Client\Client;
$apiKey = "YOUR_API_KEY";
$client =new Client($apiKey);
$data = [
"filePath": "/path/your/image.jpg"
];
$report = $client->getResource('ImageReports')->generateReportFromFile($data);
Last modified 4yr ago