curl - PHP / xmlReader with nested loops each loop calls to new URL for data -
php version 5.3.21 mysql version 5.1.70-cll
i have compile item catalog within mysql based on large data feed requires multiple calls urls build on eachother in order collect catalog data remote feed server.
i have been working curl , simplexml , have code written keeps timing out guess have @ xmlreader have never worked with. have done several hours of research on xmlreader have concerns.
can please tell me - before commit xmlreader - if can handle , if xmlreader wise choice in case - im concerned nested loops here , having call different urls within each loop.
my silly psuedocode:
open reader open datafeed url list of manufacturer ids using url =http://acmedata.com/data/?do=getmanufacturers each manufacturer id $xx list of models ids using http://acmedata.com/data/?do=getmodels?manuid=$xx foreach model id $yy list of products using url http://acmedata.com/data/?do=getproducts?manuid=$xx?modelid=$yy foreach product enter product attributes mysql.... close foreach product close foreach model id close each manufacturer close reader
so im not sure if close reader , re open each new url? have not seen examples of folks using foreach xmlreader... im concerned cant pull off xmlreader.
thanks advice.
Comments
Post a Comment