Page 1 of 1

Parsing shopping.com API Images

Posted: Wed Jul 27, 2011 3:09 am
by petergoeswest
Hi first of let me say I am a complete PHP Newbie, I am trying Parse the following.

http://sandbox.api.shopping.com/publish ... d=40940649

I have managed tp pull Product Description with the following code.

Code: Select all

<?php
$oXML = simplexml_load_file('http://sandbox.api.shopping.com/publisher/3.0/rest/GeneralSearch?apiKey=authorized-key&trackingId=7000610&productId=40940649');
foreach ($oXML->categories->category->items->product as $oProduct)
{
    echo '<h2>' . $oProduct->name . '</h2>';
    echo '<p>' . $oProduct->fullDescription . '</p>';
    echo sprintf('<a href="%s" title="%s">%s</a>',
        $oProduct->productOffersURL,
        $oProduct->name,
        'More information'
    );
}
?>
This works fine but for the life of me I cannot parse Product Image I keep getting errors, could someone please please head me in the correct direction.
Thx in advance kind regards Peter.