Thanks Oliver,

With your help this is how I got the process working in PHP, thank again:

  $adGroupCriterionService =
  $user->GetService('AdGroupCriterionService', ADWORDS_VERSION);

 // Declare variables
$NegativeAdGroupId = $val['adGroupID'];
// OVERIDE FOR TESTING
$NegativeAdGroupId = 000000000000;
//$keywordTxtBroad = substr($keywordTxt, 0, 24);
$NegativeKeywordTxt = substr($val['searchTerm'], 0, 24);
 // Create keyword criterion.
$keyword = new Keyword();
///$keyword->text = $NegativeKeywordTxt . uniqid();
$keyword->text = $NegativeKeywordTxt;
$keyword->matchType = 'BROAD';

$adGroupCriterion = new NegativeAdGroupCriterion();
 $adGroupCriterion->adGroupId = $NegativeAdGroupId;
$adGroupCriterion->criterion = $keyword;

$adGroupCriteria[] = $adGroupCriterion;

// Create operation.
$operation = new AdGroupCriterionOperation();
$operation->operand = $adGroupCriterion;
$operation->operator = 'ADD';
$operations[] = $operation;

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to