1. Go to this page and download the library: Download googleads/googleads-php-lib 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/ */
googleads / googleads-php-lib example snippets
$oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()
->build();
$session = (new AdManagerSessionBuilder())->fromFile()
->withOAuth2Credential($oAuth2Credential)
->build();
$adManagerServices = new ServiceFactory();
$networkService = $adManagerServices->createNetworkService($session);
$networks = $networkService->getAllNetworks();
// Do something with the $networks.
$session = (new AdManagerSessionBuilder())
...
->withSoapLogger(new MyCustomSoapLogger())
->withReportDownloaderLogger(new MyCustomReportDownloaderLogger())
->build();