PHP code example of talk2cerlin / akamai

1. Go to this page and download the library: Download talk2cerlin/akamai 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/ */

    

talk2cerlin / akamai example snippets




kamai\Facades\Config;
use Akamai\Facades\Akamai;
use Akamai\Facades\Token;

// For loading config info from different env file. Can be used to change credentials on run time. This method overwrites the existing config with latest one.
Config::loadFromENV('./', '.akamai');

// Getting the akamai config in runtime
$config = Config::getAkamaiConfig();

try {
    /**
     * @var array
     * Example: [
     *              "data" =>
     *                  "<?xml version="1.0" encoding="ISO-8859-1"