PHP API AdGroup ID format


hi guys, there supports php bing api library? 

i have problem adgroup id formats.

first of all, "addadgroupsrequest" i'm gettings such result in "$response->adgroupids->long[0]":

float 1.1368950466744e+15

which equals "1136895046674400". real id "1136895046674416", we're losing 2 last digits here.

going further, when trying add ad's "addadsrequest", i'm getting "the adgroup id invalid" message because library converts such long id's above integer, results in 2147483647 number, seems be largest positive value of signed integer in 32-bit systems.

here code library, file 'bingads/v10/campaignmanagementclasses.php':

    /**       * adds 1 or more ads ad group.       * @link http://msdn.microsoft.com/en-us/library/dn277506(v=msads.100).aspx addads request object       *        * @uses ad       * @used-by bingadscampaignmanagementservice::addads       */      final class addadsrequest      {          /**           * identifier of ad group add ads to.           * @var integer           */          public $adgroupid;            /**           * array of ads add specified ad group.           * @var ad[]           */          public $ads;      }

how could $adgroupid integer? maybe it's because of local environment? use 64-bit os , php-5.6-x64.
looking forward reply, thanks.

hello.

i can confirm adgroupid 'long' service standpoint i.e. defined in singlewsdl , documented on msdn

regarding max int size on local machine found following in php manual.

"the size of integer platform-dependent, although maximum value of 2 billion usual value (that's 32 bits signed). 64-bit platforms have maximum value of 9e18, except on windows prior php 7, 32 bit. php not support unsigned integers. integer size can determined using constant php_int_size, maximum value using constant php_int_max since php 5.0.5, , minimum value using constant php_int_min since php 7.0.0."

also might need both 64-bit php , 64-bit hardware native 64-bit integers. if local environment not support it, work if cast adgroupids result of addadgroups float array instead?

best regards,

eric



Bing Ads API: Development  >  Bing Ads API: Development



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'