You are here: Re: Haveing trouble aquiring an xml document « PHP Programming Language « IT news, forums, messages
Re: Haveing trouble aquiring an xml document

Posted by Steve on 11/04/34 11:28

> $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));

Don't pass the file handle to xml_parse(). Get some data from the file
handle and pass that. You can either get /all/ the data and pass it in
one lump, or make multiple calls to fread() and pass each chunk until
there's no more to read.

while( !feof($soap) )
{
$xmldata = fread($soap,1024);
xml_parse($parser,$xmldata) or die( ... );
}
fclose($soap);
xml_parser_free($parser);

---
Steve

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация