OZONE Asylum
Forums
Server-Side Scripting - Oh my!
Problem with parsing remote xml files
This page's ID:
27694
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
I tried that as a last resort : [code] $max_loops = 5; $loops = 0; while ( (strpos($xml, "</stats>") === false) && ($loops < $max_loops)) { $handle = fopen ($xml_file, "rb"); $xml = ''; while ($buffer = fread ($handle, 4096)) $xml .= $buffer; $loops++; fclose($handle); } [/code] It seemed to improve the percentage of files correctly read... But not much, perhaps it is just my imagination :D I contacted somebody running a server generating this kind of xml file. He told me that it was probably because the xml files I am trying to parse were edited very often. I dunnow... Anyway, it was just a personnal exercise to set up an xml parser, so I won't bother trying to make it work all the time. Again, thank you guys for the help :) ---- If wishes were fishes, we'd all cast nets. [url=http://www.ozoneasylum.com/5700] [img]http://moon.shadow.free.fr/images/sigs/index.php[/img] [/url] [small](Edited by [url=http://www.ozoneasylum.com/user/2913]Moon Shadow[/url] on 03-29-2006 00:33)[/small]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »
Maximum Security
OZONE
DHTML/Javascript
Server-Side Scripting - Oh my!
CSS - DOM - XHTML - XML - XSL - XSLT
Stupid Basic HTML
Visual Therapy
Photoshop
Photoshop Pong, Anyone?
***WARNING*** BIG SIG APPROACHING
Photography
3D Modelling & Rendering
Multimedia/Animation
Print Graphics
Holding Pens
Philosophy and other Silliness
Outpatient Counseling
Site reviews!
Mad Scientists' Laboratory
Getting to know the Grail