This class can be used to join files retrieve via HTTP into a single file. It takes a list of HTTP URLs and retrieves the data from the specified locations. The class gathers the retrieved data and save it to a single local file. see in action example from its wiki to Get the files you should push the files in array like that: $fileList = array(); $fileList[] = 'http://www.ackrentals.net/css/reset.css'; $fileList[] = 'http://www.ackrentals.net/css/960_24_col.css'; PHP: and then you should start new FileJoiner $joiner = new FileJoiner($fileList); PHP: then you have option enable you to compress the file by delete any Unhelpful comments $joiner->compression = true; PHP: then you should determine the file that will join it some thing like this $joiner->join('css/allstyles.css'); PHP: and at end you should unset the variables unset($joiner); PHP: download it http://www.jooria.com/projects/view?project=977&m=downloads PHP:
You do realize that fopen could do this already right? So can CURL, and file, and a few other libraries that are included in PHP already.