Hi,
The following line is the one that creates the service and should be
outside of the loop:
$adGroupAdService = $user->GetAdGroupAdService('v200909');
Alternatively you can enable WSDL caching to store the WSDL locally:
http://code.google.com/p/google-api-adwords-php/source/browse/trunk/src/Google/Api/Ads/AdWords/settings.ini#23
Best,
- Eric Koleda, AdWords API Team
On Aug 6, 10:28 am, phpguy <[email protected]> wrote:
> In reference to this
> post:http://groups.google.com/group/adwords-api/browse_thread/thread/8db67...
>
> I received the same error but am including the service inside of the
> loop. The error occurs occasionally but when you said
> "We recommend that you create the service only once outside of the
> loop and reuse it for every request."
>
> Given this code:
>
> [start of loop]
> $adGroupAdService = $user->GetAdGroupAdService('v200909');
> $adGroupId = (float) $adGroup->id;
> $selector = new AdGroupAdSelector();
> ...
> [end of loop]
>
> - which parts need to be outside the loop (above the [start of loop])?
> - does this apply for all types of operations? (e.g.
> campaignselector, adgroupselector, adgroupoperation,
> getcampaignservice, etc)
> - can i just clarify them all at the very top like a variable?
>
> Thanks for your help!
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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