Icecat XML verwerken

Door 19 januari 2013Tips & Trucs

Icecat is een fantastisch systeem om gratis product informatie te verkrijgen (en betaald nog veel meer). Helaas zijn er maar weinig goede/betaalbare kant en klare oplossingen te vinden om de gegevens te integreren. De URL integratie is dan wel super makkelijk zelf te doen maar als het om XML gaat wordt het vaak een ander verhaal. Inmiddels heb ik meerdere Icecat integraties gedaan, dit was allemaal op maat en niet voor standaard e-commerce systemen als Magento, Prestashop, etc. Bij deze een stukje code om een XML “datasheet” uit te lezen. De gewenste waardes opgeven en je krijgt een array terug met alle informatie. Dit kan uitgebreid worden om de gegevens op te slaan in een database natuurlijk. Vervolgens kunnen met die gegevens eventuele product vergelijkingen of filters gemaakt worden.

Icecat XML functie

<?php
/**
 * =================================================================
 * Copyright (c) 2013 Roy Duineveld (royduineveld.nl)
 * =================================================================
 *
 * License
 * =================================================================
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use,
 * copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following
 * conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 * =================================================================
 *
 * Notes
 * =================================================================
 * PHP 5.3 or higher is required!
 * =================================================================
 *
 * Changelog
 * =================================================================
 * Version 1.0 (19-01-2013)
 * - First release
 * Version 1.1 (22-01-2013)
 * - Two typos fixt
 * - Added ignore_errors in a stream_context_create function so
 *   file_get_contents will get the content even if it's returning
 *   a 404. So error 2 will not be triggered before error 3 get his
 *   chance. Error 3 correspond to the error Icecat is giving.
 * Version 1.2 (26-07-2013)
 * - Added urlencode to the SKU in the url so special chars will be
 *   encoded
 * =================================================================
 */

/**
 * Read Icecat data from XML into a array
 * @param  array $data Information array
 * Information array options:
 * ==========================
 * - ean 		= Product EAN
 * - sku 		= Product SKU
 * - brand  	= Product brand
 * - id_full 	= Icecat ID (if you've full Icecat)
 * - id_free 	= Icecat ID (if you're using Open-Icecat)
 * - language 	= Language
 * - username 	= Icecat username
 * - password  	= Icecat password
 * ==========================
 * @return array       Product information
 */
function icecat_to_array($data = array())
{
	// Extract data array
	extract($data);

	// Check given array
	if(!isset($ean) AND !isset($sku) AND !isset($id_full) AND !isset($id_free)){ $errors[1] = 'No EAN, SKU or Icecat ID given!'; goto the_end; }
	if(isset($sku) AND !isset($brand)){ $errors[1] = 'SKU given but no brand!'; goto the_end; }
	if(!isset($language)){ $errors[1] = 'No language given!'; goto the_end; }
	if(!isset($username) OR !isset($password)){ $errors[1] = 'No username and/or password given!'; goto the_end; }

	// Set url
	if(isset($ean)){ $url = 'http://' . $username . ':' . $password . '@data.Icecat.biz/xml_s3/xml_server3.cgi?ean_upc=' . $ean . ';lang=' . $language . ';output=productxml'; }
	if(isset($sku)){ $url = 'http://' . $username . ':' . $password . '@data.Icecat.biz/xml_s3/xml_server3.cgi?prod_id=' . urlencode($sku) . ';vendor=' . $brand . ';lang=' . $language . ';output=productxml'; }
	if(isset($id_free)){ $url = 'http://' . $username . ':' . $password . '@data.icecat.biz/export/freexml.int/' . $language . '/'.$id_free.'.xml'; }
	if(isset($id_full)){ $url = 'http://' . $username . ':' . $password . '@data.icecat.biz/export/level4/' . $language . '/'.$id_full.'.xml'; }

	// Get data
	$xml = @file_get_contents($url,false,stream_context_create(array('http' => array('ignore_errors' => true))));
	if(!$xml){ $errors[2] = 'Unable to download the product feed! Maybe Icecat isn\'t reachable!'; goto the_end; }

	// Load into Simple XML Element
	$xml = new SimpleXMLElement($xml);

	// Set xpaths
	$product 			= $xml->xpath("/ICECAT-interface/Product");
	$product_attr 		= $product[0]->attributes();

		// Does Icecat give errors?
		if($product_attr['ErrorMessage']){ $errors[3] = (string)$product_attr['ErrorMessage']; goto the_end; }

	$category 			= $xml->xpath("/ICECAT-interface/Product/Category");

	$description 		= $xml->xpath("/ICECAT-interface/Product/ProductDescription");
	$description_attr 	= $description[0]->attributes();

	$supplier			= $xml->xpath("/ICECAT-interface/Product/Supplier");
	$supplier_attr		= $supplier[0]->attributes();

	$images 			= $xml->xpath("/ICECAT-interface/Product/ProductGallery");

	$eans				= $xml->xpath("/ICECAT-interface/Product/EANCode");

	$featurelogo		= $xml->xpath("/ICECAT-interface/Product/FeatureLogo");

	$spec_group			= $xml->xpath("/ICECAT-interface/Product/CategoryFeatureGroup");
	$spec_item			= $xml->xpath("/ICECAT-interface/Product/ProductFeature");

	$related 			= $xml->xpath("/ICECAT-interface/Product/ProductRelated");

	// Set product information
	$p['id'] 			= (int)$product_attr['ID'];
	$p['name']			= (string)$product_attr['Name'];
	$p['title']			= (string)$product_attr['Title'];
	$p['sku']			= (string)$product_attr['Prod_id'];
	$p['release']		= (string)$product_attr['ReleaseDate'];
	$p['img_thumb']		= (string)$product_attr['ThumbPic'];
	$p['img_small']		= (string)$product_attr['LowPic'];
	$p['img_mid']		= (string)$product_attr['Pic500x500'];
	$p['img_high']		= (string)$product_attr['HighPic'];
	$p['pdf_spec']		= (string)$description_attr['PDFURL'];
	$p['pdf_manual']	= (string)$description_attr['ManualPDFURL'];
	$p['descr_long']	= str_replace('\n','<br />',(string)$description_attr['LongDesc']);
	$p['descr_short']	= (string)$description_attr['ShortDesc'];
	$p['url']			= (string)$description_attr['URL'];
	$p['warrenty']		= (string)$description_attr['WarrantyInfo'];
	$p['category'] 		= (string)$category[0]->Name[0]['Value'];
	$p['category_id']	= (int)$category[0]['ID'];

	// Set brand
	$p['brand_id'] 		= (int)$supplier_attr['ID'];
	$p['brand_name']	= (string)$supplier_attr['Name'];

	// Set images
	foreach($images[0] as $image)
	{
		$image_attr	= $image->attributes();
		$p['image'][(int)$image_attr['ProductPicture_ID']]['thumb']	= (string)$image_attr['ThumbPic'];
		$p['image'][(int)$image_attr['ProductPicture_ID']]['small']	= (string)$image_attr['LowPic'];
		$p['image'][(int)$image_attr['ProductPicture_ID']]['mid']	= (string)$image_attr['Pic500x500'];
		$p['image'][(int)$image_attr['ProductPicture_ID']]['high']	= (string)$image_attr['Pic'];
	}

	// Set EAN numbers
	foreach($eans as $ean)
	{
		$p['ean'][] = (string)$ean[0]['EAN'];
	}

	// Set featurelogos
	foreach($featurelogo as $logo)
	{
		$logo_attr = $logo->attributes();
		$p['featurelogo'][(int)$logo_attr['Feature_ID']]['image'] = (string)$logo_attr['LogoPic'];
		$p['featurelogo'][(int)$logo_attr['Feature_ID']]['descr'] = trim((string)$logo->Descriptions->Description);
	}

	// Set specification groups
	foreach($spec_group as $group)
	{
		$p['spec'][(int)$group[0]['ID']]['name'] = (string)$group->FeatureGroup->Name[0]['Value'];
	}

	// Set specifications
	foreach($spec_item as $item)
	{
		if($item[0]['Value'] != 'Icecat.biz')
		{
			$p['spec'][(int)$item[0]['CategoryFeatureGroup_ID']]['features'][(int)$item->Feature->Name[0]['ID']]['name'] = (string)$item->Feature->Name[0]['Value'];
			$p['spec'][(int)$item[0]['CategoryFeatureGroup_ID']]['features'][(int)$item->Feature->Name[0]['ID']]['value'] = (string)$item[0]['Value'];
			$p['spec'][(int)$item[0]['CategoryFeatureGroup_ID']]['features'][(int)$item->Feature->Name[0]['ID']]['sign'] = (string)$item->Feature->Measure->Signs->Sign;
			$p['spec'][(int)$item[0]['CategoryFeatureGroup_ID']]['features'][(int)$item->Feature->Name[0]['ID']]['pres_value'] = (string)$item[0]['Presentation_Value'];
		}
	}

	// Remove empty specification groups
	foreach($p['spec'] as $key=>$value)
	{
		if(!isset($value['features'])){
			unset($p['spec'][$key]);
		}
	}

	// Related products
	foreach($related as $test)
	{
		$p['related'][(int)$test->Product[0]['ID']]['name'] 	= (string)$test->Product[0]['Name'];
		$p['related'][(int)$test->Product[0]['ID']]['category'] = (int)$test[0]['Category_ID'];
		$p['related'][(int)$test->Product[0]['ID']]['sku'] 		= (string)$test->Product[0]['Prod_id'];
		$p['related'][(int)$test->Product[0]['ID']]['img'] 		= (string)$test->Product[0]['ThumbPic'];
		$p['related'][(int)$test->Product[0]['ID']]['brand']	= (string)$test->Product->Supplier[0]['Name'];
		$p['related'][(int)$test->Product[0]['ID']]['brand_id']	= (string)$test->Product->Supplier[0]['ID'];
	}

	the_end:

	// Return errors if set, else product information
	if(isset($errors)){
		return $errors;
	} else {
		return $p;
	}
}
?>

Gebruik

Zoals in de code staat aangegeven zijn er meerdere waardes welke ingevuld kunnen worden. Taal, gebruikersnaam en wachtwoord zijn verplicht op te geven. Daarnaast zijn er nog 4 verschillende manieren om product informatie op te vragen. Via een EAN, SKU of Icecat nummer (waarbij onderscheid wordt gemaakt tussen Open-Icecat en Full-Icecat). Daarbij een aantal voorbeelden:

Via een EAN nummer

<?php
// Get Icecat data in array by EAN number
$data = array(
	'ean'		=> '4026203907966',
	'language'	=> 'NL',
	'username'	=> 'openIcecat-xml',
	'password'	=> 'freeaccess'
);
$data = icecat_to_array($data);
echo '<pre>'.print_r($data,TRUE).'</pre>';
?>

Via een SKU nummer

<?php
// Get Icecat data in array by SKU number
$data = array(
	'sku'		=> 'PDA01E-00101KDU',
	'brand'		=> 'Toshiba',
	'language'	=> 'NL',
	'username'	=> 'openIcecat-xml',
	'password'	=> 'freeaccess'
);
$data = icecat_to_array($data);
echo '<pre>'.print_r($data,TRUE).'</pre>';
?>

Via een Icecat nummer (Open-Icecat)

<?php
// Get Icecat data in array by Icecat number (Open-Icecat)
$data = array(
	'id_free'	=> '10433706',
	'language'	=> 'NL',
	'username'	=> 'openIcecat-xml',
	'password'	=> 'freeaccess'
);
$data = icecat_to_array($data);
echo '<pre>'.print_r($data,TRUE).'</pre>';
?>

Via een Icecat nummer (Full-Icecat)

<?php
// Get Icecat data in array by Icecat number (Full-Icecat)
$data = array(
	'id_full'	=> '10433706',
	'language'	=> 'NL',
	'username'	=> 'openIcecat-xml',
	'password'	=> 'freeaccess'
);
$data = icecat_to_array($data);
echo '<pre>'.print_r($data,TRUE).'</pre>';
?>

Foutmeldingen

Deze functie geeft wanneer er fouten zijn, deze terug in een array. Daarbij zijn er drie verschillende “keys”:

  • 1 = Er is iets niet opgegeven
  • 2 = XML kan niet gedownload worden (Waarschijnlijk is Icecat in dat geval niet bereikbaar)
  • 3 = Door Icecat opgegeven foutmeldingen

Resultaat

Wat doet het nu eigenlijk? Het haalt de gegevens op van een product zoals hier te vinden: http://icecat.nl/p/toshiba/pda01e-00101kdu/tablets-4026203907966-at100-100-10433706.html. Die gegevens staan in een XML welke hier te vinden is: http://openIcecat-xml:[email protected]/export/freexml.int/NL/10433706.xml en welke vervolgens omgezet wordt naar een array met als resultaat:

Array
(
    [id] => 10433706
    [name] => AT100-100
    [title] => Toshiba AT100-100
    [sku] => PDA01E-00101KDU
    [release] => 2011-08-03
    [img_thumb] => http://images.icecat.biz/thumbs/10433706.jpg
    [img_small] => http://images.icecat.biz/img/norm/low/10433706-5954.jpg
    [img_mid] => http://images.icecat.biz/img/norm/medium/10433706-5954.jpg
    [img_high] => http://images.icecat.biz/img/norm/high/10433706-5954.jpg
    [pdf_spec] =>
    [pdf_manual] =>
    [descr_long] => <b>De perfecte som van alle delen</b><br /><br />Kijk naar HD-films. Speel games. Surf op internet. De hele dag.
    [descr_short] => 25.654 cm (10.1 ") , NVIDIA Tegra 250, 16 GB SSD, 1 GB DDR2, 5.0 MP + 2.0 MP, HDMI, 802.11b/g/n, Bluetooth, Android 3.1
    [url] =>  http://nl.computers.toshiba-europe.com/innovation/product/Toshiba-AT100-100/1111265/toshibaShop/false/
    [warrenty] => 2 jaar
    [category] => tablets
    [category_id] => 897
    [brand_id] => 2
    [brand_name] => Toshiba
    [image] => Array
        (
            [1149199] => Array
                (
                    [thumb] => http://images.icecat.biz/img/gallery_thumbs/10433706_838.jpg
                    [small] => http://images.icecat.biz/img/gallery_lows/10433706_838.jpg
                    [mid] => http://images.icecat.biz/img/gallery_mediums/10433706_838.jpg
                    [high] => http://images.icecat.biz/img/gallery/10433706_838.jpg
                )

            [1149200] => Array
                (
                    [thumb] => http://images.icecat.biz/img/gallery_thumbs/10433706_9614.jpg
                    [small] => http://images.icecat.biz/img/gallery_lows/10433706_9614.jpg
                    [mid] => http://images.icecat.biz/img/gallery_mediums/10433706_9614.jpg
                    [high] => http://images.icecat.biz/img/gallery/10433706_9614.jpg
                )

            [1149201] => Array
                (
                    [thumb] => http://images.icecat.biz/img/gallery_thumbs/10433706_4135.jpg
                    [small] => http://images.icecat.biz/img/gallery_lows/10433706_4135.jpg
                    [mid] => http://images.icecat.biz/img/gallery_mediums/10433706_4135.jpg
                    [high] => http://images.icecat.biz/img/gallery/10433706_4135.jpg
                )

            [1149202] => Array
                (
                    [thumb] => http://images.icecat.biz/img/gallery_thumbs/10433706_3416.jpg
                    [small] => http://images.icecat.biz/img/gallery_lows/10433706_3416.jpg
                    [mid] => http://images.icecat.biz/img/gallery_mediums/10433706_3416.jpg
                    [high] => http://images.icecat.biz/img/gallery/10433706_3416.jpg
                )

            [1149203] => Array
                (
                    [thumb] => http://images.icecat.biz/img/gallery_thumbs/10433706_427.jpg
                    [small] => http://images.icecat.biz/img/gallery_lows/10433706_427.jpg
                    [mid] => http://images.icecat.biz/img/gallery_mediums/10433706_427.jpg
                    [high] => http://images.icecat.biz/img/gallery/10433706_427.jpg
                )

            [1] => Array
                (
                    [thumb] => http://images.icecat.biz/img/feature_logo_thumbs/1-7814.png
                    [small] =>
                    [mid] =>
                    [high] => http://images.icecat.biz/img/feature_logo/1-7814.png
                )

        )

    [ean] => Array
        (
            [0] => 4026203907966
        )

    [featurelogo] => Array
        (
            [2183] => Array
                (
                    [image] => http://images.icecat.biz/img/feature_logo/1-7814.png
                    [descr] => Bluetooth is een open standaard voor draadloze verbindingen tussen apparaten op korte afstand. Dankzij Bluetooth kunnen bijvoorbeeld adresgegevens tussen mobiele telefoons worden uitgewisseld, kan snel vanaf een handheld computer worden geprint, of kan een mobiele telefoon worden uitgerust met een draadloze headset.
                )

        )

    [spec] => Array
        (
            [840] => Array
                (
                    [name] => Technische details
                    [features] => Array
                        (
                            [476867] => Array
                                (
                                    [name] => Kleur van het product
                                    [value] => Black
                                    [sign] =>
                                    [pres_value] => Zwart
                                )

                            [476599] => Array
                                (
                                    [name] => Model
                                    [value] => Slate
                                    [sign] =>
                                    [pres_value] => Slate
                                )

                        )

                )

            [830] => Array
                (
                    [name] => Processor
                    [features] => Array
                        (
                            [1036524] => Array
                                (
                                    [name] => Processor clock speed
                                    [value] => 1
                                    [sign] => GHz
                                    [pres_value] => 1 GHz
                                )

                            [852540] => Array
                                (
                                    [name] => Processor cache
                                    [value] => 1
                                    [sign] => MB
                                    [pres_value] => 1 MB
                                )

                        )

                )

            [832] => Array
                (
                    [name] => Geheugen
                    [features] => Array
                        (
                            [1036616] => Array
                                (
                                    [name] => Internal memory
                                    [value] => 1
                                    [sign] => GB
                                    [pres_value] => 1 GB
                                )

                            [476932] => Array
                                (
                                    [name] => Kloksnelheid geheugen
                                    [value] => 666
                                    [sign] => MHz
                                    [pres_value] => 666 MHz
                                )

                        )

                )

            [833] => Array
                (
                    [name] => Beeldscherm
                    [features] => Array
                        (
                            [476642] => Array
                                (
                                    [name] => Beeldschermdiagonaal
                                    [value] => 10.1
                                    [sign] => "
                                    [pres_value] => 256.5 mm (10.1 ")
                                )

                            [476849] => Array
                                (
                                    [name] => Resolutie
                                    [value] => 1280 x 800
                                    [sign] => Pixels
                                    [pres_value] => 1280 x 800 Pixels
                                )

                            [477013] => Array
                                (
                                    [name] => LED backlight
                                    [value] => Y
                                    [sign] =>
                                    [pres_value] => Ja
                                )

                            [476976] => Array
                                (
                                    [name] => Touchscreen
                                    [value] => Y
                                    [sign] =>
                                    [pres_value] => Ja
                                )

                            [476520] => Array
                                (
                                    [name] => Beeldverhouding
                                    [value] => 16:10
                                    [sign] =>
                                    [pres_value] => 16:10
                                )

                        )

                )

            [847] => Array
                (
                    [name] => Aansluitingen
                    [features] => Array
                        (
                            [476908] => Array
                                (
                                    [name] => USB 2.0 poort(en)
                                    [value] => 1
                                    [sign] =>
                                    [pres_value] => 1
                                )

                            [708626] => Array
                                (
                                    [name] => Mini-USB 2.0 ports quantity
                                    [value] => 1
                                    [sign] =>
                                    [pres_value] => 1
                                )

                            [476606] => Array
                                (
                                    [name] => Aantal HDMI-poorten
                                    [value] => 1
                                    [sign] =>
                                    [pres_value] => 1
                                )

                            [476911] => Array
                                (
                                    [name] => Luidspreker/ koptelefoon/ line-out uitgang
                                    [value] => 1
                                    [sign] =>
                                    [pres_value] => 1
                                )

                            [476912] => Array
                                (
                                    [name] => Microfoon, line-in ingang
                                    [value] => Y
                                    [sign] =>
                                    [pres_value] => Ja
                                )

                            [472519] => Array
                                (
                                    [name] => Basisstationaansluiting
                                    [value] => N
                                    [sign] =>
                                    [pres_value] => Nee
                                )

                        )

                )

            [848] => Array
                (
                    [name] => Gewicht en omvang
                    [features] => Array
                        (
                            [476854] => Array
                                (
                                    [name] => Breedte
                                    [value] => 273
                                    [sign] => mm
                                    [pres_value] => 273 mm
                                )

                            [476855] => Array
                                (
                                    [name] => Diepte
                                    [value] => 177
                                    [sign] => mm
                                    [pres_value] => 177 mm
                                )

                            [476837] => Array
                                (
                                    [name] => Hoogte
                                    [value] => 15.8
                                    [sign] => mm
                                    [pres_value] => 15.8 mm
                                )

                            [476541] => Array
                                (
                                    [name] => Gewicht
                                    [value] => 765
                                    [sign] => g
                                    [pres_value] => 0.765 kg
                                )

                        )

                )

            [849] => Array
                (
                    [name] => Energie
                    [features] => Array
                        (
                            [476608] => Array
                                (
                                    [name] => AC adapter ingangsspanning
                                    [value] => 100 - 240
                                    [sign] => V
                                    [pres_value] => 100 - 240 V
                                )

                            [476609] => Array
                                (
                                    [name] => AC adapter frequentie
                                    [value] => 50/60
                                    [sign] => Hz
                                    [pres_value] => 50/60 Hz
                                )

                            [476610] => Array
                                (
                                    [name] => AC adapter uitgangsspanning
                                    [value] => 19
                                    [sign] => V
                                    [pres_value] => 19 V
                                )

                            [476611] => Array
                                (
                                    [name] => AC adapter uitgangsstroom
                                    [value] => 1.58
                                    [sign] => A
                                    [pres_value] => 1.58 A
                                )

                        )

                )

            [2678] => Array
                (
                    [name] => Netwerk
                    [features] => Array
                        (
                            [476958] => Array
                                (
                                    [name] => WLAN verbinding
                                    [value] => Y
                                    [sign] =>
                                    [pres_value] => Ja
                                )

                            [476672] => Array
                                (
                                    [name] => Bluetooth
                                    [value] => Y
                                    [sign] =>
                                    [pres_value] => Ja
                                )

                            [476553] => Array
                                (
                                    [name] => Draadloos
                                    [value] => 802.11b, 802.11g, 802.11n
                                    [sign] =>
                                    [pres_value] => 802.11b, 802.11g, 802.11n
                                )

                            [476796] => Array
                                (
                                    [name] => Bluetooth versie
                                    [value] => 2.1+EDR
                                    [sign] =>
                                    [pres_value] => 2.1+EDR
                                )

                        )

                )

            [4142] => Array
                (
                    [name] => Opslagmedia
                    [features] => Array
                        (
                            [476959] => Array
                                (
                                    [name] => Totale opslagcapaciteit
                                    [value] => 16
                                    [sign] => GB
                                    [pres_value] => 16 GB
                                )

                            [763755] => Array
                                (
                                    [name] => Opslagmedia-type
                                    [value] => SSD
                                    [sign] =>
                                    [pres_value] => SSD
                                )

                        )

                )

            [7818] => Array
                (
                    [name] => Navigatie
                    [features] => Array
                        (
                            [476355] => Array
                                (
                                    [name] => GPS functie
                                    [value] => N
                                    [sign] =>
                                    [pres_value] => Nee
                                )

                        )

                )

            [3489] => Array
                (
                    [name] => Besturingssysteem/software
                    [features] => Array
                        (
                            [476956] => Array
                                (
                                    [name] => Inclusief besturingssysteem
                                    [value] => Android 3.1
                                    [sign] =>
                                    [pres_value] => Android 3.1
                                )

                            [476547] => Array
                                (
                                    [name] => Meegeleverde software
                                    [value] => Toshiba File Manager\nToshiba Online Manual\nToshiba Places Client\nMcAfee WaveSecure\nEvernote\nAdobe Reader\nToshiba Media Player
                                    [sign] =>
                                    [pres_value] => Toshiba File Manager\nToshiba Online Manual\nToshiba Places Client\nMcAfee WaveSecure\nEvernote\nAdobe Reader\nToshiba Media Player
                                )

                        )

                )

            [4346] => Array
                (
                    [name] => Camera
                    [features] => Array
                        (
                            [623119] => Array
                                (
                                    [name] => Ingebouwde camera
                                    [value] => Y
                                    [sign] =>
                                    [pres_value] => Ja
                                )

                            [734480] => Array
                                (
                                    [name] => Main camera resolution
                                    [value] => 5
                                    [sign] => MP
                                    [pres_value] => 5 MP
                                )

                            [475627] => Array
                                (
                                    [name] => Tweede camera
                                    [value] => Y
                                    [sign] =>
                                    [pres_value] => Y
                                )

                            [708668] => Array
                                (
                                    [name] => Second camera resolution
                                    [value] => 2
                                    [sign] => MP
                                    [pres_value] => 2 MP
                                )

                        )

                )

            [7821] => Array
                (
                    [name] => Accu/Batterij
                    [features] => Array
                        (
                            [476554] => Array
                                (
                                    [name] => Batterijtechnologie
                                    [value] => Lithium-Ion (Li-Ion)
                                    [sign] =>
                                    [pres_value] => Lithium-Ion (Li-Ion)
                                )

                        )

                )

            [7816] => Array
                (
                    [name] => Other features
                    [features] => Array
                        (
                            [476600] => Array
                                (
                                    [name] => Stroomvoorziening
                                    [value] => 100/240 V
                                    [sign] =>
                                    [pres_value] => 100/240 V
                                )

                            [473021] => Array
                                (
                                    [name] => SIM card support
                                    [value] => N
                                    [sign] =>
                                    [pres_value] => Nee
                                )

                            [476832] => Array
                                (
                                    [name] => Processorfamilie
                                    [value] => NVIDIA Tegra
                                    [sign] =>
                                    [pres_value] => NVIDIA Tegra
                                )

                            [476695] => Array
                                (
                                    [name] => Front-side bus processor
                                    [value] => 333
                                    [sign] => MHz
                                    [pres_value] => 333 MHz
                                )

                            [476981] => Array
                                (
                                    [name] => SSD capaciteit
                                    [value] => 16
                                    [sign] => GB
                                    [pres_value] => 16 GB
                                )

                        )

                )

            [7823] => Array
                (
                    [name] => Card reader
                    [features] => Array
                        (
                            [476963] => Array
                                (
                                    [name] => Geïntegreerde kaartlezer
                                    [value] => Y
                                    [sign] =>
                                    [pres_value] => Ja
                                )

                            [476591] => Array
                                (
                                    [name] => Compatibele geheugenkaarten
                                    [value] => MMC, SD, SDHC
                                    [sign] =>
                                    [pres_value] => MMC, SD, SDHC
                                )

                        )

                )

        )

    [related] => Array
        (
            [8017370] => Array
                (
                    [name] => Stylus Pen - Black
                    [category] => 203
                    [sku] => 17741
                    [img] => http://images.icecat.biz/thumbs/8017370.jpg
                    [brand] => Trust
                    [brand_id] => 244
                )

            [8017374] => Array
                (
                    [name] => Universal Cleaning Kit
                    [category] => 367
                    [sku] => 17749
                    [img] => http://images.icecat.biz/thumbs/8017374.jpg
                    [brand] => Trust
                    [brand_id] => 244
                )

            [6944308] => Array
                (
                    [name] => AMM01
                    [category] => 203
                    [sku] => AMM01EU
                    [img] => http://images.icecat.biz/thumbs/6944308.jpg
                    [brand] => Targus
                    [brand_id] => 128
                )

        )

)

Dit resultaat kan je vervolgens verwerken in je website door deze gegevens op te slaan in een database of gewoon direct weer te geven.

Array verwerken

Er komt in de toekomst nog een artikel hoe deze array verwerkt kan worden! ~Update: Deel 2, de array weergeven