PHP code example of hichxm / wargaming-api

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

    

hichxm / wargaming-api example snippets


	$WarGaming = new WargamingApi($application_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", $region = "eu");
	

		$WarGaming->searchPlayers($search = "volca", $options = [
			"limit" => 10,
			"method" => "startswith",
			"region" => "eu"
		]);
		

		$WarGaming->infoPlayersById($players_id = ["500080014", "514444123", "514444121"], $options = [
			"region" => "eu"
		]);
		

		$WarGaming->serverInfo($region = "eu");
		

		$WarGaming->searchClans($search = "volca", $options = [
			"limit" => 10,
			"pagination" => "1",
			"region" => "eu"
		]);
		

		$WarGaming->infoClansById($clans_id = ["500041879", "500034196"], $options = [
			"region" => "eu"
		]);
		

		$WarGaming->playerClans($players_id = ["500450795", "503197062", "500435236"]);