Is there a way to have php echo multiple files?
Posted: Wed Jan 27, 2010 12:59 pm
I'm making a flash site that loads in several external reasuorces. It needs these resources loaded before it can run.
My first question: is it bad to make mutable http requests at once? I remember hearing that there is a performance penalty for downloading more then two files at once.
My second question: is there a way to have php echo mutable files with one request? Ideally I would have php organize these files in an array and I would then have my flash site pull the files out of the array once once loaded. I know about readfile() and fpassthru(), but these functions only echo the first file I tell the script to send. I know about the zip function, but im worried that this will tie up a lot of server resources. I would like to keep the site scalable and im worried that the php zip function will be too expensive. Unfortunately I cant zip the external resources and request a static zip file, because the site is customized to each user and will load a different set of resources for different users.
Thanks
My first question: is it bad to make mutable http requests at once? I remember hearing that there is a performance penalty for downloading more then two files at once.
My second question: is there a way to have php echo mutable files with one request? Ideally I would have php organize these files in an array and I would then have my flash site pull the files out of the array once once loaded. I know about readfile() and fpassthru(), but these functions only echo the first file I tell the script to send. I know about the zip function, but im worried that this will tie up a lot of server resources. I would like to keep the site scalable and im worried that the php zip function will be too expensive. Unfortunately I cant zip the external resources and request a static zip file, because the site is customized to each user and will load a different set of resources for different users.
Thanks