Using getAdCode() in PHP?

43 views
Skip to first unread message

d...@viewex.co.uk

unread,
Feb 10, 2015, 7:01:03 AM2/10/15
to adsen...@googlegroups.com
Hi,

Can I use AdUnit.getAdCode() in PHP?

I can't find it in get_class-methods() of my ad unit.

How do I generate the actual HTML ad code (async + sync) rather than returning the plain number?

Cheers

Dean Lukies (Adsense API Team)

unread,
Feb 10, 2015, 2:43:18 PM2/10/15
to adsen...@googlegroups.com
Hi,
Is this what you are looking for?

$result = $service->accounts_adunits->getAdCode($accountId, $adClientId, $adUnitId);
print $result['adCode'];

thanks,
Dean

PS: I wanted to remind people about stackoverflow.com and the adsense-api tag !
Reply all
Reply to author
Forward
Message has been deleted
0 new messages