PHP code example of rosell-dk / webp-convert-cloud-service
1. Go to this page and download the library: Download rosell-dk/webp-convert-cloud-service 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/ */
rosell-dk / webp-convert-cloud-service example snippets
\WebPConvertCloudService\WebPConvertCloudService;
$options = [
// Set dir for storing converted images temporarily
// Make sure to create that dir, with permissions for web server to write.
// You can __DIR__ to get same dir as this script, or "dirname(__DIR__)" to get parent dir of the script,
'destination-dir' => dirname(__DIR__) . '/conversions',
// Set acccess restrictions
'access' => [
'whitelist' => [
[
'ip' => '*',
'api-key' => 'my dog is white',
'
curl --form action="api-version" http://wpc.example.com/wpc.php