PHP code example of utopia-php / fastly
1. Go to this page and download the library: Download utopia-php/fastly 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/ */
utopia-php / fastly example snippets
use Utopia\Client\Client;
use Utopia\Client\Adapter\Curl\Client as CurlAdapter;
use Utopia\Fastly\Fastly;
0eY',
token: 'your-fastly-api-token',
);
// Invalidate every response tagged with this surrogate key.
$fastly->purge('homepage');
$fastly = new Fastly($client, $serviceId, $token, 'https://cdn.internal/service', 'X-Purge-Key');
bash
composer