I am making a soap request to an amazon server and trying to parse the
xml. The request -
is succesful in my browser. But I can't get it into my script.
<?php
$parser=xml_par ser_create();
xml_set_element _handler($parse r,"start_handle r","end_handler ");
xml_set_charact er_data_handler ($parser,"chara cter_handler");
xml_parser_set_ option($parser, XML_OPTION_CASE _FOLDING, 0);
$soap=fopen("ht tp://webservices.ama zon.co.uk/onca/xml?Service=AWS ECommerceServic e&SubscriptionI d=0PHDGJJ5S75MM 3PERG02&Operati on=ItemSearch&S earchIndex=Book s&Keywords=live rpool&ResponseG roup=Medium","r ");
xml_parse ($parser,$soap) or die (format_error($ parser));
xml_parser_free ($parser);
.....
....?>
returns an XML ERROR (2) Syntax error.
Is it that fopen is not the correct way to aquire the xml ?
Thank you
xml. The request -
is succesful in my browser. But I can't get it into my script.
<?php
$parser=xml_par ser_create();
xml_set_element _handler($parse r,"start_handle r","end_handler ");
xml_set_charact er_data_handler ($parser,"chara cter_handler");
xml_parser_set_ option($parser, XML_OPTION_CASE _FOLDING, 0);
$soap=fopen("ht tp://webservices.ama zon.co.uk/onca/xml?Service=AWS ECommerceServic e&SubscriptionI d=0PHDGJJ5S75MM 3PERG02&Operati on=ItemSearch&S earchIndex=Book s&Keywords=live rpool&ResponseG roup=Medium","r ");
xml_parse ($parser,$soap) or die (format_error($ parser));
xml_parser_free ($parser);
.....
....?>
returns an XML ERROR (2) Syntax error.
Is it that fopen is not the correct way to aquire the xml ?
Thank you
Comment