Official PHP SDK of the ImageSEO API. This allows you to use our API: https://imageseo.io
API Documentation : https://docs.imageseo.io/
- PHP version 5.6 and later
- ImageSEO API Key, starting at free level
You can install the library via Composer. Run the following command:
composer require imageseo/imageseo-php
To use the library, use Composer's autoload:
require_once __DIR__. '/vendor/autoload.php';
View all ressources : https://docs.imageseo.io/resources
-
Projects
:- getOwner()
-
ImageReports
- generateReportFromUrl($data,$query = null)
- generateReportFromFile($data,$query = null)
-
Languages
- getLanguages()
<?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 = [
"src": "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);
Get languages available
<?php
use ImageSeo\Client\Client;
$apiKey = "YOUR_API_KEY";
$client =new Client($apiKey);
$report = $client->getResource('Languages')->getLanguages();
imageseo-php
is guided and supported by the ImageSEO Developer Team.