parktek08
IS-IT--Management
- Dec 7, 2008
- 13
I am connecting to a web service thru soap client like
$results = $client->search(array("developerKey" => $developerKey,
"websiteId" => $websiteId,
"advertiserSku" => 'N82E16858191069'));
print_r($results);
this outputs something like this to my browser:
stdClass Object ( [out] => stdClass Object ( [count] => 1 [offset] => 0 [products] => stdClass Object ( [Product] => stdClass Object ( [adId] => 10440897 [advertiserId] => 182344 [advertiserName] => test.com [buyUrl] => [catalogId] => cjo:1460 [currency] => USD [description] => MLAN [imageUrl] => [inStock] => [isbn] => [manufacturerName] => N [manufacturerSku] => 980-0054-R01 [name] => America [price] => 9 [retailPrice] => 0 [salePrice] => 9.99 [sku] => 1069 [upc] => ) ) [totalResults] => 1 ) )
I want to be able to retrieve the values of invidual variables [buyUrl] or [advertiserName] as string and insert in to db. I have tried many things like get_object_vars, extract, and few other things but nothing seems to work. any help would be appreicated. thanks
$results = $client->search(array("developerKey" => $developerKey,
"websiteId" => $websiteId,
"advertiserSku" => 'N82E16858191069'));
print_r($results);
this outputs something like this to my browser:
stdClass Object ( [out] => stdClass Object ( [count] => 1 [offset] => 0 [products] => stdClass Object ( [Product] => stdClass Object ( [adId] => 10440897 [advertiserId] => 182344 [advertiserName] => test.com [buyUrl] => [catalogId] => cjo:1460 [currency] => USD [description] => MLAN [imageUrl] => [inStock] => [isbn] => [manufacturerName] => N [manufacturerSku] => 980-0054-R01 [name] => America [price] => 9 [retailPrice] => 0 [salePrice] => 9.99 [sku] => 1069 [upc] => ) ) [totalResults] => 1 ) )
I want to be able to retrieve the values of invidual variables [buyUrl] or [advertiserName] as string and insert in to db. I have tried many things like get_object_vars, extract, and few other things but nothing seems to work. any help would be appreicated. thanks