Introduction
This download contains the PHP classes for version 9 of the Bing Ads web services. For your convenience, we’ve created classes for the request/response
messages, data objects, and value set that each service defines in its WSDL.
Description
Don't want to create the classes yourself? No worries. Just download the PHP files that contain the class and include them in your application.
For example, after downloading the PHP file that contains the reporting classes, you can use the following snippet to include the reporting classes in your application.
include
'bingads\ReportingClasses.php';
include
'bingads\ClientProxy.php';
// Specify the BingAds\Reporting objects that will be used.
use
BingAds\Reporting\SubmitGenerateReportRequest;
use
BingAds\Reporting\KeywordPerformanceReportRequest;
use
BingAds\Reporting\ReportFormat;
use
BingAds\Reporting\ReportAggregation;
use
BingAds\Reporting\AccountThroughAdGroupReportScope;
use
BingAds\Reporting\CampaignReportScope;
use
BingAds\Reporting\ReportTime;
use
BingAds\Reporting\ReportTimePeriod;
use
BingAds\Reporting\KeywordPerformanceReportFilter;
use
BingAds\Reporting\DeviceTypeReportFilter;
use
BingAds\Reporting\KeywordPerformanceReportColumn;
use
BingAds\Reporting\PollGenerateReportRequest;
use
BingAds\Reporting\ReportRequestStatusType;
use
BingAds\Reporting\KeywordPerformanceReportSort;
use
BingAds\Reporting\SortOrder;
// Specify the BingAds\Proxy object that will be used.
use
BingAds\Proxy\ClientProxy;
The following shows how you can instantiate the report object and set some of its properties.
PHP
Edit|Remove
php
$report = new AccountPerformanceReportRequest();
$report->Format = ReportFormat::Xml;
$report->ReportName = 'My Account Performance Report';
$report->ReturnOnlyCompleteData = false;
$report->Aggregation = ReportAggregation::Yearly;
$report = new AccountPerformanceReportRequest();
$report->Format = ReportFormat::Xml;
$report->ReportName = 'My Account Performance Report';
$report->ReturnOnlyCompleteData = false;
$report->Aggregation = ReportAggregation::Yearly;
Source Code Files
AdIntelligenceClasses.php - Contains the classes for the
Ad Intelligence service.
BulkClasses.php - Contains the classes for the
Bulk service.
CampaignManagementClasses.php - Contains the classes for the
Campaign Management service.
ClientProxy.php - Contains the proxy class to set the service headers and make a service call.
CustomerBillingClasses.php - Contains the classes for the
Customer Billing service.
CustomerManagementClasses.php - Contains the classes for the
Customer Management service.
OptimizerClasses.php - Contains the classes for the
Optimizer service.
ReportingClasses.php - Contians classes for the
Reporting service.