Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3759482
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T10:19:24+00:00 2026-05-19T10:19:24+00:00

Is it done correctly? I am still confused with how api works. I am

  • 0

Is it done correctly? I am still confused with how api works. I am newbie. I have gone around google to find answers. I followed tutorial and tried to modify it. It is basic one.

I would like to retrieve the images of products which is on sale (mode=hot) for slideshow. I will appreciate the help if you could help me to understand how api shld be done.

EDIT
I am trying to pull the images from database in pinnacle cart. so i wanted to list out what it have in xml. All xml you see below is on source view but not on webpage itself, is it normal? Also when I am trying to show the images on webpage and the images don’t appear. I am not sure where I went wrong.

     <Product>
  <Price><![CDATA[695.00000]]></Price>
 <Visible><![CDATA[Yes]]></Visible>
<Taxable><![CDATA[Yes]]></Taxable>
<Weight><![CDATA[0.00]]></Weight>
<UPC><![CDATA[]]></UPC>
<Sku><![CDATA[]]></Sku>
<Title><![CDATA[Necklace]]></Title>
<URL><![CDATA[https://xxxxx/staging/index.php?p=product&amp;id=80]]></URL>
<ThumbnailImageUrl><![CDATA[http://www.xxxxxxxxxx.com/staging/images/products/thumbs/100040.jpg]]></ThumbnailImageUrl>
<ImageUrl><![CDATA[http://www.xxxxxxxx.com/staging/images/products/100040.jpg]]></ImageUrl>
<Discontinued><![CDATA[No]]></Discontinued>
<Options>    </Options>
<Added><![CDATA[2010-05-12 13:50:00]]></Added>
<ManufaturerName><![CDATA[]]></ManufaturerName>
<Description><![CDATA[<p>&nbsp;</p><p>&nbsp;</p>]]></Description>
<AmazonId><![CDATA[]]></AmazonId>
<AmazonItemCondition><![CDATA[]]></AmazonItemCondition>
<AmazonIdType><![CDATA[]]></AmazonIdType>
<EbayCategoryId><![CDATA[]]></EbayCategoryId>
<YahooPath><![CDATA[]]></YahooPath>
<GoogleItemCondition><![CDATA[]]></GoogleItemCondition>
<PricegrabberCategory><![CDATA[]]></PricegrabberCategory>
<PricegrabberItemCondition><![CDATA[]]></PricegrabberItemCondition>
<PricegrabberPartNumber><![CDATA[]]></PricegrabberPartNumber>
<InventoryControl><![CDATA[Yes]]></InventoryControl>
<PID><![CDATA[80]]></PID>
<ProductId><![CDATA[100040]]></ProductId>
<Qoh><![CDATA[1]]></Qoh>
<NextagCategory><![CDATA[]]></NextagCategory>
<NextagPartNumber><![CDATA[]]></NextagPartNumber>
<NextagItemCondition><![CDATA[]]></NextagItemCondition>
</Product>

My code

    <?php
    $shop='www.xxx.com/staging/content/admin/plugins/openapi/index.php?';
    $user = "asd";
    $password = "ad";
    $token = 'token';

    // Assemble the account url
    $url = 'https://'.$shop."username=".$user."&amp;password=".$password."&amp;token=".$token. "&apiType=xml&call=GetProducts&mode=hot";

    // Setup the cURL object
    $curl = curl_init();
    curl_setopt($l_oCurl, CURLOPT_POST, 1);
    curl_setopt( $curl, CURLOPT_URL, $url );

    $response=curl_exec($curl);
    curl_close($curl);
    $image_xml = new SimpleXMLElement($response);
   **foreach($xml->ThumbnailImageUrl as $thumbs){
echo "<img src=".$thumbs."/>";**
}

    ?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T10:19:25+00:00Added an answer on May 19, 2026 at 10:19 am

    SimpleXml can load remote URLs with simplexml_load_file and all libxml bases extensions can be used with a custom Stream Context. Just create your custom context with stream_context_create and then set it with libxml_set_streams_context. See Context List and Options

    To generate a URL encoded string, use http_build_query

    As for using SimpleXml, please see the Basic Usage Examples in the PHP Manual. You basically just have to traverse to the node and echo it, e.g.

    echo $sxe->someNode->someOtherNode->ThumbnailImageUrl;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have done this before, but still haven't mastered it. I downloaded a font
I'm currently working on wholesale online t-shirt shop. I have done this for fixed
I have a project that needs to be done using ASP.NET. Currently, I'm using
Done quite a lot of searching around this one and so far I've only
Have done some research and found some stuff that may be helpful. I would
I am trying to implement a RESTful API in which I have to upload
I'm following this iPhone tutorial from Apple and I think I did everything correctly,
I'm trying to implement pagination in a custom WP-Query. The pagination is done correctly,
I have been having a heck of a time getting Udp sockets working correctly
I have been working with Monodroid for a few days and still can't figure

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.