1. Go to this page and download the library: Download tustin/cod-php 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/ */
tustin / cod-php example snippets
use CallOfDuty\Client;
$client = new Client();
// Use Activision email and password to login.
$client->login('[email protected]', 'pa55w0rd');
// Username and platform the user plays on.
$user = $client->user('tustin25', 'psn');
$bo4 = $user->blackOps4();
// Or alternatively
$bo4 = $user->bo4(); // Alias of blackOps4()
$zm = $bo4->zombies();
// Spit out some user information
echo sprintf("Prestige %d, level %d\n", $zm->prestige(), $zm->level());
echo sprintf("\tKills - %d\n", $zm->lifetime()->kills());
echo sprintf("\tDowns - %d\n", $zm->lifetime()->downs());
echo sprintf("\tHeadshots - %d\n", $zm->lifetime()->headshots());