Introduction
To get started developing Bing Ads applications with PHP, you need to
set up the development environment configured for web services. You can start with the provided examples which include proxies to the Bing Ads SOAP web services. You can also browse the
PHP Examples for Bing Ads on MSDN. The examples provided in this download package and the examples within
PHP Examples for Bing Ads depend on the
example client proxies. When you download the examples you will also get the example proxy files.
Note: The proxy class files are provided as examples and subject to change. You are not required to use the provided proxies, and could write or generate your own with a custom tool.
This download includes the following PHP sample files for Bing Ads web services.
•AdExtensions (Campaign Management service)
•BulkDownloadUpload (Bulk service)
•BudgetOpportunities (Ad Insightservice)
•KeywordsAds (Campaign Management service)
•ManageClient (Customer Management service)
•NegativeKeywords (Campaign Management service)
•ReportRequests (Reporting service)
•SearchByUser (Customer Management service)
•Targets (Campaign Management service)
Building the Sample
The samples require that you update some of the following elements, and then build a project.
•$UserName
•$Password
•$DeveloperToken
•$CustomerId
•$AccountId
•$CampaignId
•$CampaignIds
Source Code Files
- AdExtensions.php - Demonstrates how to add, get, and delete extensions for an account’s ad extension library, set, get, and delete the extension associations with a campaign, and determine why an extension failed editorial review
using the following Campaign Management service operations.
- BulkDownloadUpload.php - Demonstrates how to download and upload the entities of one or more campaigns in the background.
- BudgetOpportunities.php - Demonstrates how to get the budgetopportunities for the specified account.
- KeywordsAds.php - Demonstrates how to add ads and keywords to a new ad group, and handle partial errors when some ads or keywords are not successfully created.
- GetEstimatedBid.php - Demonstrates how to get the minimum suggested bid value of one or more keywords that could result in an ad appearing in the targeted position in the search results.
- ManageClient.php - Demonstrates how to use agency credentials to invite a client, and use client credentials to accept the invitation. Run this sample multiple times to update and observe the status change, for example from LinkPending to LinkAccepted
to Active.
- NegativeKeywords.php - Demonstrates how to associate negative keywords and negative keyword lists with a campaign.
- ReportRequests.php - Demonstrates how to request and retrieve a keyword performance report.
- SearchByUser.php - Demonstrates how to search for customers that can be managed by the current authenticated user.
- Targets.php - Demonstrates how to associate targets with a campaign and ad group.
More Information
For information about updates to Bing Ads web services, see Release Notes here on MSDN:
http://msdn.microsoft.com/en-US/library/bing-ads-overview-release-notes.aspx