Try APIlity: http://google-apility.sourceforge.net/
- Jan On 14 Feb., 13:10, "ali.ghaznavi.mediafl...@gmail.com" <ali.ghaznavi.mediafl...@gmail.com> wrote: > hello, > > Need some help please > > here is the code listing > > <?php > require_once('../../_classes/google_adword_api/ > soapclientfactory.php'); > $email = 'INSERT_LOGIN_EMAIL_HERE'; > $password = 'INSERT_PASSWORD_HERE'; > $client_email = 'INSERT_CLIENT_LOGIN_EMAIL_HERE'; > $useragent = 'INSERT_COMPANY_NAM'; > $developer_token = 'INSERT_DEVELOPER_TOKEN_HERE'; > $application_token = 'WvAJVKwu5jByZG6jVT5ZwQ'; > > # Define SOAP headers. > $headers = > '<email>' . $email . '</email>'. > '<password>' . $password . '</password>' . > '<clientEmail>' . $client_email . '</clientEmail>' . > '<useragent>' . $useragent . '</useragent>' . > '<developerToken>' . $developer_token . '</developerToken>' . > '<applicationToken>' . $application_token . '</applicationToken>'; > > $namespace = 'https://adwords.google.com/api/adwords/v13'; > > $criterion_service = > SoapClientFactory::GetClient($namespace . '/CriterionService?wsdl', > 'wsdl'); > $criterion_service->setHeaders($headers); > $debug = 0; > > $id = '0000000'; > $adGroupId = '00000000'; > $paused = 'true'; > $maxCpc = '200000'; > $maxCpm = '100000'; > $criterionType = "Keyword"; > $destinationUrl = 'www.google.com'; > > $request_xml2 = > '<updateCriteria>' . > '<criteria>'. > '<adGroupId>'.$adGroupId.'</adGroupId>' .. > '<id>'.$id.'</id>' . > > '<destinationUrl>'.$destinationUrl.'</destinationUrl>'. > '<maxCpc>'.$maxCpc.'</maxCpc>'. > '<maxCpm>'.$maxCpm.'</maxCpm>'. > '<paused>'.$paused.'</paused>'. > '</criteria>'. > '</updateCriteria>'; > > $criteria = > $criterion_service->call('updateCriteria', > $request_xml2); > > if ($debug) show_xml($criterion_service); > if ($criterion_service->fault) > show_fault($criterion_service); > > # Convert to a list if we get back a single > object. > if (!$criteria[0]) { > $criteria = array($criteria); > } > > function show_xml($service) > { > echo $service->request; > echo $service->response; > echo "\n"; > > } > > function show_fault($service) { > echo "\n"; > echo 'Fault: ' . $service->fault . "\n"; > echo 'Code: ' . $service->faultcode . "\n"; > echo 'String: ' . $service->faultstring . "\n"; > echo 'Detail: ' . $service->faultdetail . "\n"; > exit(0); > > } > > ?> > > well it gives the error and i cant under stand this please guide me > how i am going to update > > Here is the error > > Fault: 1 Code: soapenv:Server.userException String: > java.lang.RuntimeException: Abstract keyValue without superclass. > Detail: > > Please Guide Me > > Regards > Ali --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---