function getCampaign(AdWordsUser $user) {
$campaignService = $user->GetService('CampaignService', ADWORDS_VERSION);
$selector = new Selector();
$selector->fields = array('Id','Name', 'Status', 'AdvertisingChannelType');
// Filter out deleted criteria.
//$selector->predicates[] = new Predicate('Status', 'NOT_IN', array('DELETED', 'PAUSED'));
$page = $campaignService->get($selector);
print_r("<pre>");
print_r($page->entries);
print_r("</pre>");
}[0] => Campaign Object
(
[id] => 9806xxxx
[name] => xxxxxxx
[status] => ENABLED
[servingStatus] =>
[startDate] =>
[endDate] =>
[budget] =>
[conversionOptimizerEligibility] =>
[adServingOptimizationStatus] =>
[frequencyCap] =>
[settings] =>
[advertisingChannelType] => SEARCH
[advertisingChannelSubType] =>
[networkSetting] =>
[labels] =>
[biddingStrategyConfiguration] =>
[forwardCompatibilityMap] =>
[trackingUrlTemplate] =>
[urlCustomParameters] =>
)//Definition
//Ads will be served with Google.com search results
//targetGoogleSearch
//Ads will be served on partner sites in the Google Search Network
//targetSearchNetwork
//Ads will be served on specified placements in the Google Display Network
//targetContentNetwork
//Ads will be served on the Google Partner Network
//targetPartnerSearchNetwork
$x = $user->GetService('CampaignService', ADWORDS_VERSION);
$selector = new Selector();
$selector->fields = array(
'Id',
'Name',
'Status',
'TargetGoogleSearch',
'TargetSearchNetwork',
'TargetContentNetwork',
'TargetPartnerSearchNetwork'
);
$campaign = $x->get($selector);
print_r("<pre>");
print_r($campaign->entries);
print_r("</pre>");
//Or you can get value with for each
foreach ($campaign->entries as $result) {
printf("<strong>Id:</strong> %s<br>", $result->id);
printf("<strong>Name:</strong> %s<br>", $result->name);
printf("<strong>Status:</strong> %s<br>", $result->status);
printf("<strong>Google.com search results:</strong> %s<br>", $result->networkSetting->targetGoogleSearch);
}