1. Go to this page and download the library: Download braze/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/ */
braze / sdk example snippets
use Braze\Braze;
$braze = new Braze('YOUR_API_URL', 'YOUR_API_KEY');
$client = $braze->client;
use Braze\Client;
$httpClient = \Http\Discovery\Psr18ClientDiscovery::find();
$uri = \Http\Discovery\Psr17FactoryDiscovery::findUriFactory()->createUri('YOUR_API_URL');
$bearer = new \Http\Message\Authentication\Bearer('YOUR_API_KEY');
$plugins = [
new \Http\Client\Common\Plugin\AddHostPlugin($uri),
new \Http\Client\Common\Plugin\AuthenticationPlugin($bearer),
];
$httpClient = new \Http\Client\Common\PluginClient($httpClient, $plugins);
$client = Client::create($httpClient);