PHP code example of okdewit / optimizely-php-sdk

1. Go to this page and download the library: Download okdewit/optimizely-php-sdk 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/ */

    

okdewit / optimizely-php-sdk example snippets


$optimizely = new Optimizely(<<DATAFILE>>);

$optimizelyClient = OptimizelyFactory::createDefaultInstance("your-sdk-key", <<DATAFILE>>, <<DATAFILE_AUTH_TOKEN>>);

$configManager = $optimizelyClient->configManager;

$configManager = new HTTPProjectConfigManager(<<SDK_KEY>>);
$optimizely = new Optimizely(<<DATAFILE>>, null, null, null, false, null, $configManager);

$configManager = new HTTPProjectConfigManager(<<SDK_KEY>>);

php composer.phar