Hi,

This is a PHP error, and it looks like you aren't getting the data
you're expecting.  Do a print_r on $campaign_stats to see the data
being returned by the service:

  $campaign_stats = $campaign_service->call('getCampaignStats',
$request_xml);
  // Add this line
  print_r($campaign_stats);

Take a look at the output and you can see what your response data is.

Best,
- Eric Koleda, AdWords API Team

On Mar 5, 4:11 am, "Mr. Junior" <cu3blo...@gmail.com> wrote:
> Hi there,
>
> I am new to Adwords API. I am using Google Adwords API v13.
>
> I want to display all items as they are diplayed in Google Adwords
> Account (i.e. List of all client Accounts, Clicks, Impressions, Search
> CTR, Content CTR, Conversion, Conv. Rate & amount spent).
>
> Below given is my code. whenever i run this code, I get an error
> saying " Notice: Undefined index: getCampaignStatsReturn in C:\wamp\www
> \google_api_test\campaign_stats.php  on line 34
> Array ( [0] => ) "
>
> ---------------------------------------------------------- MY CODE
> STARTS
> --------------------------------------------------------------------
>
> <?php
> require_once('soapclientfactory.php');
> include("login_details.php"); // including file with login details
>
> # 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>';
>
> # Set up service connection.
>
> $namespace = 'https://sandbox.google.com/api/adwords/v13';
> $campaign_service =
>   SoapClientFactory::GetClient($namespace . '/CampaignService?wsdl',
> 'wsdl');
> $campaign_service->setHeaders($headers);
> $debug = 0;
>
> $campaignIds = array(87356);
>
>  $start = '2010-03-01';
>
>  $end = '2010-03-04';
>
> $request_xml = '<getCampaignStats><campaignIds>'.$campaignIds.'</
> campaignIds><startDay>'.$start.'</startDay><endDay>'.$end.'</endDay></
> getCampaignStats>';
> $campaign_stats = $campaign_service->call('getCampaignStats',
> $request_xml);
> $campaign_stats = $campaign_stats['getCampaignStatsReturn'];
>
> if ($debug) $this->show_xml($campaign_service);
> //if ($campaign_service->fault) show_fault($campaign_service);
>
> # Convert to a list if we get back a single object.
> /*
> if (!$campaign_stats[0]) {
>   $campaign_stats = array($campaign_stats);}
>
> */
> $campaign_stats = array($campaign_stats);
>
>  print_r($campaign_stats);
> ?>
>
> ---------------------------------------------------------- MY CODE
> ENDS
> -----------------------------------------------------------------------
>
> Please help me as I am not able to find a reliable solution to this
> problem.
>
> Thanks & god bless all

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Have you migrated to v200909 yet?
The v13 sunset is on April 22, 2010.

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 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

Reply via email to