1. Go to this page and download the library: Download sightengine/client-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/ */
sightengine / client-php example snippets
composer
use \Sightengine\SightengineClient;
$client = new SightengineClient('{api_user}', '{api_secret}');
# Detect nudity in an image
$output = $client->check(['nudity'])->set_url('http://img09.deviantart.net/2bd0/i/2009/276/c/9/magic_forrest_wallpaper_by_goergen.jpg')
# Detect nudity, weapons, alcohol, drugs, likely fruadulant users, celebrities and faces in an image, along with image properties and type
$output = $client->check(['nudity', 'type', 'properties', 'wad', 'face', 'scam', 'celebrity'])->set_url('http://img09.deviantart.net/2bd0/i/2009/276/c/9/magic_forrest_wallpaper_by_goergen.jpg')
# Detect nudity in an image
$output = $client->check(['nudity'])->set_file('/full/path/to/image.jpg')
# Detect nudity, weapons, alcohol, drugs and faces in an image, along with image properties and type
$output = $client->check(['nudity', 'type', 'properties', 'wad', 'face'])->set_file('/full/path/to/image.jpg')
# Detect nudity in an image
$output = $client->check(['nudity'])->set_bytes($binary_image)
# Detect nudity, weapons, alcohol, drugs and faces in an image, along with image properties and type
$output = $client->check(['nudity', 'type', 'properties', 'wad', 'face'])->set_bytes($binary_image)