Re: problème de ajouter character Eure (€)
i have a problem while uploading creatives which contain the EUR sign ( ). So on trying to upload the following description1 A partir de 1,68€. En stock. and i use this code $price = html_entity_decode('A partir de #8364;1,68. En stock.', ENT_QUOTES, 'UTF-8'); in my script of php API google adwords version v201309. the creative gets rejected with the error message An error has occurred: [PolicyViolationError{super=PolicyViolationError.POLICY_ERROR @ operations[0].operand.ad.description1, key=PolicyViolationKey{policyName=nonstandard_punctuation,violatingText=‚¬} Can you help me please? thank you a lot. -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://googleadsdeveloper.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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com 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 adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: problem add character Eure (€)
i have a problem while uploading creatives which contain the EUR sign ( ). So on trying to upload the following description1 A partir de 1,68€. En stock. and i use this code $price = html_entity_decode('A partir de #8364;1,68. En stock.', ENT_QUOTES, 'UTF-8'); in my script of php API google adwords version v201309. the creative gets rejected with the error message An error has occurred: [PolicyViolationError{super=PolicyViolationError.POLICY_ERROR @ operations[0].operand.ad.description1, key=PolicyViolationKey{policyName=nonstandard_punctuation,violatingText=‚¬} Can you help me please? thank you a lot. -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://googleadsdeveloper.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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com 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 adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
problem add character Eure (€)
Hello Team How do I add a character € of price with adwords api Php ? Help please. I'm working on AddTextAds.php V201309 -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://googleadsdeveloper.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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com 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 adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
problème de ajouter character Eure (€)
Hello Team How do I add a character € of price with adwords api Php ? Help please. I'm working on AddTextAds.php V201309 -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://googleadsdeveloper.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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com 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 adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Problem api adword
Hi, I copied the same script as AddTextAds.php but i ve alaways the same error [AdError.INVALID_AD_TYPE @ operations[0].operand.ad] help please. -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://googleadsdeveloper.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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com 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 adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Fwd: Where is my mistake? Please help.[AdError.INVALID_AD_TYPE @ operations[0].operand.ad
Hi, i like add new keywords , i try to do this way : soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:v20=https://adwords.google.com/api/adwords/cm/v201309; soapenv:Header v20:RequestHeader v20:authTokenDQA*/v20:authToken v20:clientCustomerId/v20:clientCustomerId v20:developerToken*/v20:developerToken v20:userAgent/v20:userAgent v20:validateOnlyfalse/v20:validateOnly v20:partialFailurefalse/v20:partialFailure /v20:RequestHeader /soapenv:Header soapenv:Body v20:mutate v20:operations v20:operatorADD/v20:operator v20:Operation.TypeAdGroupAd/v20:Operation.Type v20:operand v20:adGroupId8424820921/v20:adGroupId v20:ad v20:id1/v20:id v20:url http://www.example.com/epson-xp-205-c-2879_20194.html/v20:url v20:displayUrlhttp://www.example.com//v20:displayUrl v20:Ad.TypeTextAd/v20:Ad.Type /v20:ad v20:experimentData v20:experimentId2/v20:experimentId v20:experimentDeltaStatusEXPERIMENT_ONLY/v20:experimentDeltaStatus v20:experimentDataStatusACTIVE/v20:experimentDataStatus /v20:experimentData v20:statusPAUSED/v20:status v20:approvalStatusUNCHECKED/v20:approvalStatus v20:forwardCompatibilityMap v20:key/v20:key v20:value/v20:value /v20:forwardCompatibilityMap /v20:operand v20:exemptionRequests v20:key v20:policyName/v20:policyName !--Optional:-- v20:violatingText/v20:violatingText /v20:key /v20:exemptionRequests /v20:operations /v20:mutate /soapenv:Body /soapenv:Envelope after that i've got the next error [AdError.INVALID_AD_TYPE @ operations[0].operand.adWhere is my mistake. Please help. soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; soap:Header ResponseHeader xmlns= https://adwords.google.com/api/adwords/cm/v201309; requestId0004ecbb5c7439f80ae05f0372b5/requestId serviceNameAdGroupAdService/serviceName methodNamemutate/methodName operations1/operations responseTime286/responseTime /ResponseHeader /soap:Header soap:Body soap:Fault faultcodesoap:Server/faultcode faultstring[AdError.INVALID_AD_TYPE @ operations[0].operand.ad ]/faultstring detail ApiExceptionFault xmlns= https://adwords.google.com/api/adwords/cm/v201309; message[AdError.INVALID_AD_TYPE @ operations[0].operand.ad ]/message ApplicationException.TypeApiException/ApplicationException.Type errors xsi:type=AdError xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance; fieldPathoperations[0].operand.ad/fieldPath trigger/ errorStringAdError.INVALID_AD_TYPE/errorString ApiError.TypeAdError/ApiError.Type reasonINVALID_AD_TYPE/reason /errors /ApiExceptionFault /detail /soap:Fault /soap:Body /soap:Envelope -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://googleadsdeveloper.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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com 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 adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Problem api adword
i like add new TextAdshttps://code.google.com/p/google-api-adwords-php/source/browse/examples/AdWords/v201309/BasicOperations/AddTextAds.phpto my adgroup: AddTextAds.phphttps://code.google.com/p/google-api-adwords-php/source/browse/examples/AdWords/v201309/BasicOperations/AddTextAds.php -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://googleadsdeveloper.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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com 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 adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Problem api adword
My script : *** **Begin script*** *** require_once 'src/Google/Api/Ads/AdWords/v201306/AdGroupAdService.php'; define(ADWORDS_API_VERSION, v201306); // Production API //define(ADWORDS_API_SERVER, https://adwords.google.com;); // Sandbox API define(ADWORDS_API_SERVER, https://adwords.google.com;); define(ADWORDS_API_NAMESPACE, https://adwords.google.com/api/adwords/cm/; . ADWORDS_API_VERSION); define(ADWORDS_API_ADGROUPADSERVICE, ADWORDS_API_SERVER . /api/adwords/cm/ . ADWORDS_API_VERSION . /AdGroupAdService); // Your API Developer Token define(ADWORDS_API_TOKEN, **); // The account that you want to download performace data from $username = t...@gmail.com; $password = )); $customerId = 576-***-3559; try { // Get an auth token for the user $url = https://www.google.com/accounts/ClientLogin;; $params = array( accountType = GOOGLE, Email = $username, Passwd = $password, service = adwords, source = test ); $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_HEADER, false); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $params); curl_setopt($curl, CURLOPT_ENCODING, ); $curlData = curl_exec($curl); curl_close($curl); $pos = strpos($curlData, Auth=); if ($pos -1) { $auth = trim(substr($curlData, $pos + 5)); } else { throw new Exception(You haven't supplied a valid username or password for an existing Google account.); } // Create the headers needed to access the API $headers = array( developerToken = ADWORDS_API_TOKEN, userAgent = agence, clientCustomerId = $customerId, authToken = $auth ); // Encode the headers $encodedHeaders = new SoapHeader(ADWORDS_API_NAMESPACE, RequestHeader, $headers, false); $options = array( 'features' = SOAP_SINGLE_ELEMENT_ARRAYS, 'encoding' = 'utf-8'); // Create the SOAP client $client = new SoapClient(ADWORDS_API_ADGROUPADSERVICE . ?wsdl, $options); $client-__setSoapHeaders($encodedHeaders); $adGroupId = '8424820921'; $numAds = 5; $operations = array(); // for ($i = 0; $i $numAds; $i++) { // Create text ad. $textAd = new TextAd(); $textAd-headline = 'Cruise'; $textAd-description1 = 'Visit'; $textAd-description2 = 'Low-gravity'; $textAd-displayUrl = 'www.example.com'; $textAd-url = 'http://www.example.com'; $textAd-AdType = TextAd; // Create ad group ad. $adGroupAd = new AdGroupAd(); $adGroupAd-adGroupId = $adGroupId; $adGroupAd-ad = $textAd; // Set additional settings (optional). $adGroupAd-status = 'PAUSED'; // Create operation. $operation = new AdGroupAdOperation(); $operation-operand = $adGroupAd; $operation-operator = 'ADD'; $operations[] = $operation; // } // Make the mutate request. $result = $client-mutate($operations); // Display results. foreach ($result-value as $adGroupAd) { printf(Text ad with headline '%s' and ID '%s' was added.\n, $adGroupAd-ad-headline, $adGroupAd-ad-id); } } catch (Exception $e) { print_r($e); if (isset($client)) { print $client-__getLastRequest() . \n; print $client-__getLastResponse() . \n; } } **END SCRIPT*** -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://googleadsdeveloper.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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com 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 adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Problem api adword
what the problem [AdError.INVALID_AD_TYPE @ operations[0].operand.ad] . -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://googleadsdeveloper.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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com 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 adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Problem api adword
Hi Team; i like add new TextAds to my adgroup what example i use please ? you should me AddTextAds.php ? thank you in advance -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://googleadsdeveloper.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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com 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 adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Problem api adword
Hello, i dont understand what the meaning this error and why i have this error : [message:protected] = [AdError.INVALID_AD_TYPE @ operations[0].operand.ad] Can you help me please to solve this problem? here are my script and response soap; thank you in advance. * ***RESPONSE SOAP SoapFault Object ( [message:protected] = [AdError.INVALID_AD_TYPE @ operations[0]. operand.ad] [string:Exception:private] = [code:protected] = 0 [file:protected] = /var/www/vhosts/httpdocs/ example.com/adwords_api_php_4.6.1/autreesai.php [line:protected] = 122 [trace:Exception:private] = Array ( [0] = Array ( [file] = /var/www/vhosts/httpdocs/ example.com/adwords_api_php_4.6.1/autreesai.php [line] = 122 [function] = __call [class] = SoapClient [type] = - [args] = Array ( [0] = mutate [1] = Array ( [0] = Array ( [0] = AdGroupAdOperation Object ( [operand] = AdGroupAd Object ( [adGroupId] = 8424820921 [ad] = TextAd Object ( [headline] = Cruise [description1] = Visit [description2] = Low-gravity [id] = [url] = http://www.example.com [displayUrl] = www.example.com [devicePreference] = [disapprovalReasons] = [AdType] = TextAd [_parameterMap:Ad:private] = Array ( [Ad.Type] = AdType ) ) [experimentData] = [status] = PAUSED [approvalStatus] = [trademarkDisapproved] = [stats] = [forwardCompatibilityMap] = ) [exemptionRequests] = [operator] = ADD [OperationType] = [_parameterMap:Operation:private] = Array ( [Operation.Type] = OperationType ) ) ) ) ) ) [1] = Array ( [file] = /var/www/vhosts/ example.com/adwords_api_php_4.6.1/autreesai.php [line] = 122 [function] = mutate [class] = SoapClient [type] = - [args] = Array ( [0] = Array ( [0] = AdGroupAdOperation Object ( [operand] = AdGroupAd Object ( [adGroupId]
to add keywords
hello everybody ,to add keywords what Webs Service Appropriate: AdGroupCriterionService or AdGroupAdService, Thanks -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://googleadsdeveloper.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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com 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 adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: what the problem ???? [AdError.INVALID_AD_TYPE @ operations[0].operand.ad] . Thanks!
SoapFault Object ( [message:protected] = [AdError.INVALID_AD_TYPE @ operations[0].operand.ad] [string:Exception:private] = [code:protected] = 0 [file:protected] = /var/www/vhosts/httpdocs/adwords_api_php_4.6.1/autreesai.php [line:protected] = 122 [trace:Exception:private] = Array ( [0] = Array ( [file] = /var/www/vhosts/httpdocs/adwords_api_php_4.6.1/autreesai.php [line] = 122 [function] = __call [class] = SoapClient [type] = - [args] = Array ( [0] = mutate [1] = Array ( [0] = Array ( [0] = AdGroupAdOperation Object ( [operand] = AdGroupAd Object ( [adGroupId] = 8424820921 [ad] = TextAd Object ( [headline] = Cruise [description1] = Visit [description2] = Low-gravity [id] = [url] = http://www.example.com [displayUrl] = www.example.com [devicePreference] = [disapprovalReasons] = [AdType] = TextAd [_parameterMap:Ad:private] = Array ( [Ad.Type] = AdType ) ) [experimentData] = [status] = PAUSED [approvalStatus] = [trademarkDisapproved] = [stats] = [forwardCompatibilityMap] = ) [exemptionRequests] = [operator] = ADD [OperationType] = [_parameterMap:Operation:private] = Array ( [Operation.Type] = OperationType ) ) ) ) ) ) [1] = Array ( [file] = /var/www/vhosts/adwords_api_php_4.6.1/autreesai.php [line] = 122 [function] = mutate [class] = SoapClient [type] = - [args] = Array ( [0] = Array ( [0] = AdGroupAdOperation Object ( [operand] = AdGroupAd Object ( [adGroupId] = 8424820921 [ad] = TextAd Object ( [headline] = Cruise [description1] = Visit
what the problem ???? [AdError.INVALID_AD_TYPE @ operations[0].operand.ad] . Thanks!
my script Php ?php // Reference to the service and version of the API you want to use require_once 'src/Google/Api/Ads/AdWords/v201306/AdGroupAdService.php'; ini_set('display_errors', 1);ini_set('log_errors', 1); define(ADWORDS_API_VERSION, v201306); // Production API //define(ADWORDS_API_SERVER, https://adwords.google.com;); // Sandbox API define(ADWORDS_API_SERVER, https://adwords.google.com;); define(ADWORDS_API_NAMESPACE, https://adwords.google.com/api/adwords/cm/; . ADWORDS_API_VERSION); define(ADWORDS_API_CAMPAIGN_SERVICE, ADWORDS_API_SERVER . /api/adwords/cm/ . ADWORDS_API_VERSION . /AdGroupAdService); // Your API Developer Token define(ADWORDS_API_TOKEN, ffrTN5H-**NvsZiA); // The account that you want to download performace data from $username = t...@gmail.com; $password = )); $customerId = 576-***-3559; try { // Get an auth token for the user $url = https://www.google.com/accounts/ClientLogin;; $params = array( accountType = GOOGLE, Email = $username, Passwd = $password, service = adwords, source = test ); $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_HEADER, false); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $params); curl_setopt($curl, CURLOPT_ENCODING, ); $curlData = curl_exec($curl); curl_close($curl); $pos = strpos($curlData, Auth=); if ($pos -1) { $auth = trim(substr($curlData, $pos + 5)); } else { throw new Exception(You haven't supplied a valid username or password for an existing Google account.); } // Create the headers needed to access the API $headers = array( developerToken = ADWORDS_API_TOKEN, userAgent = agence, clientCustomerId = $customerId, authToken = $auth ); // Encode the headers $encodedHeaders = new SoapHeader(ADWORDS_API_NAMESPACE, RequestHeader, $headers, false); $options = array( 'features' = SOAP_SINGLE_ELEMENT_ARRAYS, 'encoding' = 'utf-8'); // Create the SOAP client $client = new SoapClient(ADWORDS_API_CAMPAIGN_SERVICE . ?wsdl, $options); $client-__setSoapHeaders($encodedHeaders); // print_r($client); echo ADWORDS_API_CAMPAIGN_SERVICE . ?wsdl; var_dump($client-__getFunctions()); $adGroupId = '8424820921'; $numAds = 5; $operations = array(); // for ($i = 0; $i $numAds; $i++) { // Create text ad. $textAd = new TextAd(); $textAd-headline = 'Cruise'; $textAd-description1 = 'Visit'; $textAd-description2 = 'Low-gravity'; $textAd-displayUrl = 'www.example.com'; $textAd-url = 'http://www.example.com'; $textAd-AdType = TextAd; // Create ad group ad. $adGroupAd = new AdGroupAd(); $adGroupAd-adGroupId = $adGroupId; $adGroupAd-ad = $textAd; // Set additional settings (optional). $adGroupAd-status = 'PAUSED'; // Create operation. $operation = new AdGroupAdOperation(); $operation-operand = $adGroupAd; $operation-operator = 'ADD'; $operations[] = $operation; // } // Make the mutate request. $result = $client-mutate($operations); // Display results. foreach ($result-value as $adGroupAd) { printf(Text ad with headline '%s' and ID '%s' was added.\n, $adGroupAd-ad-headline, $adGroupAd-ad-id); } } catch (Exception $e) { print_r($e); if (isset($client)) { print $client-__getLastRequest() . \n; print $client-__getLastResponse() . \n; } } reponse: Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in /var/www/vhosts/httpdocs/adwords_api_php_4.6.1/autreesai.php on line 40https://adwords.google.com/api/adwords/cm/v201306/AdGroupAdService?wsdlarray(3) { [0]= string(32) getResponse get(get $parameters) [1]= string(41) mutateResponse mutate(mutate $parameters) [2]= string(38) queryResponse query(query $parameters)}SoapFault Object([message:protected] = [AdError.INVALID_AD_TYPE @ operations[0].operand.ad] [string:Exception:private] = [code:protected] = 0[file:protected] = /var/www/vhosts/httpdocs/adwords_api_php_4.6.1/autreesai.php [line:protected] = 122[trace:Exception:private] = Array( [0] = Array([file] = /var/www/vhosts/httpdocs/adwords_api_php_4.6.1/autreesai.php [line] = 122[function] = __call [class] = SoapClient[type] = -[args] = Array([0] = mutate
script AddKeywords: What is the problem could not be found
?php // Reference to the service and version of the API you want to use ini_set('display_errors', 1);ini_set('log_errors', 1); define(ADWORDS_API_VERSION, v201309); // Production API //define(ADWORDS_API_SERVER, https://adwords.google.com;); // Sandbox API define(ADWORDS_API_SERVER, https://adwords.google.com;); define(ADWORDS_API_NAMESPACE, https://adwords.google.com/api/adwords/cm/; . ADWORDS_API_VERSION); define(ADWORDS_API_CAMPAIGN_SERVICE, ADWORDS_API_SERVER . /api/adwords/cm/ . ADWORDS_API_VERSION . /AdParamService); // Your API Developer Token define(ADWORDS_API_TOKEN, ffrT**ZiA); // The account that you want to download performace data from $username = cont...@gmail.com; $password = *; $customerId = 576-859-5599; try { // Get an auth token for the user $url = https://www.google.com/accounts/ClientLogin;; $params = array( accountType = GOOGLE, Email = $username, Passwd = $password, service = adwords, source = test ); $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_HEADER, false); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $params); curl_setopt($curl, CURLOPT_ENCODING, ); $curlData = curl_exec($curl); curl_close($curl); $pos = strpos($curlData, Auth=); if ($pos -1) { $auth = trim(substr($curlData, $pos + 5)); } else { throw new Exception(You haven't supplied a valid username or password for an existing Google account.); } // Create the headers needed to access the API $headers = array( developerToken = ADWORDS_API_TOKEN, userAgent = Test, clientCustomerId = $customerId, authToken = $auth ); // Encode the headers $encodedHeaders = new SoapHeader(ADWORDS_API_NAMESPACE, RequestHeader, $headers, false); // print_r($encodedHeaders); // Create the selector $request = array( get = array( serviceSelector = array( fields = array(Id, Name) ) ) ); $bid1_soap=new SoapVar(NULL, NULL, 'money',ADWORDS_API_NAMESPACE); print_r($bid1_soap); $BiddingStrategyConfiguration=new SoapVar(NULL, NULL, 'BiddingStrategyConfiguration',ADWORDS_API_NAMESPACE); print_r($BiddingStrategyConfiguration); //for ($i = 0; $i 6; $i++) { $keywords = array( mutate = array( 'BiddingStrategyConfiguration' = new SoapVar(NULL, NULL, 'BiddingStrategyConfiguration',ADWORDS_API_NAMESPACE), adGroupId=8424820921, userStatus=PAUSED, destinationUrl=http://www.cartouche-encre.biz/toner-couleur/toner-canon;, criterion=array( text=xp 205, matchType='BROAD' ) ) ); $operation = array('operator' = 'ADD', 'operand' = $keywords); $operations = array($operation); /* $request = array( mutate = array( operations = array( array(operator=SET,operand=array(id=$adgroupidx,biddingStrategyConfiguration=array(bids=array($bid2_soap))) ) ) //--operations ) //---mutate ); //---request //} */ echo (''); // Create the SOAP client $client = new SoapClient(ADWORDS_API_CAMPAIGN_SERVICE . ?wsdl, array(trace = true)); //print_r ($client); echo ADWORDS_API_CAMPAIGN_SERVICE . ?wsdl; var_dump($client-__getFunctions()); //$result = $client-mutate($operations); // Get the campaigns $result = $client-__soapCall(mutate, $operations,null ,$encodedHeaders); print_r($result); // Output the results $campaigns = $result-rval-entries; /* foreach ($campaigns as $campaign) { print brFound campaign '{$campaign-name}' with an ID of {$campaign-id}\nbr; } */ } catch (Exception $e) { print_r($e); if (isset($client)) { print $client-__getLastRequest() . \n; print $client-__getLastResponse() . \n; } } * result: https://adwords.google.com/api/adwords/cm/v201309/AdGroupCriterionService?wsdlarray(2) { [0]= string(32) getResponse get(get $parameters) [1]= string(41) mutateResponse mutate(mutate $parameters) [2]= string(38) queryResponse query(query $parameters)}SoapFault Object([message:protected] = [NotEmptyError.EMPTY_LIST @ operations][string:Exception:private] = [code:protected] = 0[file:protected] = /var/www/vhosts/cartouche-discount.com/httpdocs/adwords_api_php_4.6.1/addKeywords.php [line:protected] = 137