I take the some youtube videos to my server with copy(); function but youtube give approximately 100kb/s speed with one connection ( my server has 100 mbit/s connection )
Is it possible to take more then 1 connection and reach faster speed with copy() function or sth else ?
Well, if you want to download / copy multiple URL from an external source concurrently,
curl_multi_exec is what you are look for.
This is a library made to synchronous curl multiple URL,
with the expenses of network bandwidth (and perhaps a little of CPU)
If you are looking to split a download,
once again, curl has the split option
RANGES With HTTP 1.1 byte-ranges were introduced. Using this, a client can request to get only one or more subparts of a specified document. Curl supports this with the -r flag. Get the first 100 bytes of a document: curl -r 0-99 http://www.get.this/ Get the last 500 bytes of a document: curl -r -500 http://www.get.this/ Curl also supports simple ranges for FTP files as well. Then you can only specify start and stop position. Get the first 100 bytes of a document using FTP: curl -r 0-99 ftp://www.get.this/README