Can I still use SimpleXML without any framework?
Also I’ve discovered I need to uncompress the file before I can save it to the server. The problem is when I try to do that it doesn’t work. This is what I’m using to save the uncompress and save the file:
<?php
set_time_limit(0);
$fp = fopen ('a.xml', 'w+');
$ch = curl_init('http://datafeed.api.productserve.com/datafeed/download/apikey/099640af374a1c61137ad9b60f202215/fid/3712/columns/aw_product_id,merchant_product_id,merchant_category,aw_deep_link,merchant_image_url,search_price,description,product_name,merchant_deep_link,aw_image_url,merchant_name,merchant_id,category_name,category_id,delivery_cost,currency,store_price,display_price,data_feed_id,rrp_price,specifications,condition,promotional_text,warranty,merchant_thumb_url,aw_thumb_url,brand_name,brand_id,delivery_time,valid_from,valid_to,web_offer,pre_order,in_stock,stock_quantity,is_for_sale,product_type,commission_group,upc,ean,mpn,isbn,model_number,parent_product_id,language,last_updated,dimensions,colour,keywords,custom_1,custom_2,custom_3,custom_4,custom_5,saving,delivery_weight,delivery_restrictions,reviews,average_rating,number_stars,number_available,rating,alternate_image,large_image,basket_link/format/xml/dtd/1.4/compression/gzip/adultcontent/1/');// or any url you can pass which gives you the xml file
curl_setopt($ch, CURLOPT_ENCODING, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 50);
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_exec($ch);
curl_close($ch);
fclose($fp);
?>
as I say though it saves the file as gibberish