|
Posted by google on 11/28/98 11:28
I am making a soap request to an amazon server and trying to parse the
xml. The request -
http://webservices.amazon.co.uk/onca/xml?Service=AWSECommerceService&SubscriptionId=0PHDGJJ5S75MM3PERG02&Operation=ItemSearch&SearchIndex=Books&Keywords=liverpool&ResponseGroup=Medium
is succesful in my browser. But I can't get it into my script.
<?php
$parser=xml_parser_create();
xml_set_element_handler($parser,"start_handler","end_handler");
xml_set_character_data_handler($parser,"character_handler");
xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING, 0);
$soap=fopen("http://webservices.amazon.co.uk/onca/xml?Service=AWSECommerceService&SubscriptionId=0PHDGJJ5S75MM3PERG02&Operation=ItemSearch&SearchIndex=Books&Keywords=liverpool&ResponseGroup=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
[Back to original message]
|