To facilitate integration with our warehouse, a simple PHP Library has been made available that allows you to open and integrate an XML file, this applies only to file xml-products (i.e. https://www.annapol.com/xml-products.php?user......).
The library can be downloaded immediately after logging in by going to:
a) Section Your account:
b) Or by downloading the library directly from the address:
The library contains the main file: products-xml.class.php and an example of use, file example.php and also file readme.txt where additional technical details are included.
File example.php contains a simple configuration in lines 7 to 13:
$config = [
// Expiries downloaded xml file
'expiries' => 60*60,
// URL xml file
'url' => 'https://www.annapol.com/xml-products.php?user=EMAIL_ADDRESS&hash=YOUR_HASH'
Variable: expiries contains the validity time of the XML file (60*60 means 1 hour)
Variable: url contains the address of the XML file given in tab Your account (after logging in);
The rest of the code shows the library implementation, in the following order:
1) Invoking library
2) Downloading the XML file if it is missing or expired.
3) Getting an table of products in an XML file in the form of ARRAY
4) Printing the first record from the ARRAY table on the screen.
The library DEMO looks like this: https://www.annapol.com/xml-example-library/demo/ Demo is an example of use.
In addition, it allows you to check whether the XML file is correctly generated and shows 1 record from it.
Every programmer will know how to use it.
In addition, we would like to inform you that the current xml-products file (https://www.annapol.com/xml-products.php?user ......) has been improved and there should be no problems with opening it.
We recommend using the browser Firefox – Mozilla which is best for opening and saving XML files.
However, it is best to use the mentioned PHP Library.