I am working with file_get_contents getting remote files and processing them. Unfortunately the files are quite large and I only need a small segment from each. I know exactly from what offset I would need to read and the length of it but reading the php manual it seems that this is possible with file_get_contents only on local files.
Is there a method which doesn’t download the whole file?
If anyone stumbles upon this a good way to handle it is to use cURL and
CURLOPT_WRITEFUNCTION.